Jump to content


Photo

New Tool (2.7) Additional File Formats Tool


  • Please log in to reply
66 replies to this topic

#26 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 14 May 2011 - 08:47

Nope. I'm referring to after having clicked an EXS on the Disk Browser. It then asks for where the actual Samples themselves are. a savable Default location for where to try and locate the wavefiles for the .exs files is what would be wonderful. mxb: is it possible to glean the path referred to in the .exs file itself ? If not, then a default sample load folder would be very decent.


What is the path to the instrument file and the path to the samples?

Currently searched paths for samples are as follows (relative to instrument file (.exs/.sxt/.akp/etc)):

  • ./
  • ./<instrument-name>/
  • ./samples/
  • ./<instrument-name>-samples/
  • ./<instrument-name>_samples/
  • ./<instrument-name> samples/

I can update this list if required if there is a standard sample location I have missed.


Ok, tried this out, and there is a key omission on the akp format - I couldn't figure out if there's a workaround or not.

A of the akps I have are drum kits that don't use keytracking. That is to say, they play at the original pitch and speed no matter where they are on the keyboard. They're not doing that when imported, so I need to change the program into a "Drumkit" which automatically remaps the basenote. That's not a *terrible* workaround but I did kind of have the original note mappings under my fingers before...


Please PM me further details of the expected behaviour and a link to an archive with the akp file and samples (as a test case) and I'll take a look at this for you.

Thanks
Is a footer a sweater for feet?

#27 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2671 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests://Varying Interests//

Posted 14 May 2011 - 10:16

What is the path to the instrument file and the path to the samples?
Currently searched paths for samples are as follows (relative to instrument file (.exs/.sxt/.akp/etc)):

  • ./
  • ./<instrument-name>/
  • ./samples/
  • ./<instrument-name>-samples/
  • ./<instrument-name>_samples/
  • ./<instrument-name> samples/
I can update this list if required if there is a standard sample location I have missed.


[*]~/Library/Application Support/Logic/Sampler Instruments/
and subfolders there-of..

Edited by esaruoho, 14 May 2011 - 10:17.

http://lackluster.org | on Bandcamp | on YouTube | on Facebook | on Spotify | on iTunes | on TiDAL | on Soundcloud | 

http://twitter.com/esaruoho | http://esaruoho.tumblr.com | GitHubesaruoho@gmail.com | 

| macOS 10.13 High Sierra | MacBook Pro 2.8 GHz Intel Core i7 / 16 Gb 1600 MHz DDR 3 |

| http://renoise.com/tools/paketti | BTC: 1BoZ9rvb8wT7dFNyVPwSX7DLj3stNo7844 | http://paypal.me/esaruoho |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;) http://forum.renoise.com/index.php/topic/26329-the-api-wishlist-thread/page-3#entry240266

#28 Fullofkittens

Fullofkittens

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 532 posts
  • Gender:Male

Posted 14 May 2011 - 13:15

Please PM me further details of the expected behaviour and a link to an archive with the akp file and samples (as a test case) and I'll take a look at this for you.

Thanks


Sent! Thanks!
My music on Fwonk*
Latest on soundcloud (06-03-2011): Posture Photo 8: Counts Are Better (Cryptozoology Mix)

#29 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 14 May 2011 - 13:50

Ok, tried this out, and there is a key omission on the akp format - I couldn't figure out if there's a workaround or not.

A of the akps I have are drum kits that don't use keytracking. That is to say, they play at the original pitch and speed no matter where they are on the keyboard. They're not doing that when imported, so I need to change the program into a "Drumkit" which automatically remaps the basenote. That's not a *terrible* workaround but I did kind of have the original note mappings under my fingers before...


Thanks for the example patch.

As I was already on the computer I've had a look at this issue.

The base note for samples on the Akai S5k/S6k/etc is stored in the actual audio file (.wav). In the example patch that you sent, none of these had been changed from the default (C4), probably because they were ignored by the sampler (keytracking off).

The workaround I have implemented is that if and only if the keyrange is a single note (e.g. for a drum kit) then the base note will also be set to this note overiding any setting in the audio file. This should not have any affect upon more 'instrument' style patches, yet should fix the issue you highlighted.

I've given it a quick test and it appears to work fine so I'll roll this into the next update.

Thanks for reporting the issue clearly and with an example patch.

As a side note for other users, if you find a bug in this tool please supply an example patch exhibiting the behaviour and a clear decription of what occurs and what what expected to myself via private message. This makes identifying the issue much easier.

Thanks
Is a footer a sweater for feet?

#30 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7159 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 14 May 2011 - 14:04

Currently searched paths for samples are as follows


Where in the code is this, what file and line? I'll write you a patch.

The convention is:

/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files
/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Instruments

For example:

/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Instruments/Vibraphone.exs
/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files/Vibraphone/*.*

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : MBC Archives »


#31 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2671 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests://Varying Interests//

Posted 14 May 2011 - 14:07

Where in the code is this, what file and line? I'll write you a patch.

The convention is:

/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files
/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Instruments

For example:

/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Instruments/Vibraphone.exs
/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files/Vibraphone/*.*


/Library/Application Support/Logic/Sampler Instruments/
~/Library/Application Support/Logic/Sampler Instruments

For instance like
~/Library/Application Support/Logic/Sampler Instruments/keys/03rw-Ethnic/Gendar
~/Library/Application Support/Logic/Sampler Instruments/keys/03rw-Ethnic/Gendar/Gendar - wav

http://lackluster.org | on Bandcamp | on YouTube | on Facebook | on Spotify | on iTunes | on TiDAL | on Soundcloud | 

http://twitter.com/esaruoho | http://esaruoho.tumblr.com | GitHubesaruoho@gmail.com | 

| macOS 10.13 High Sierra | MacBook Pro 2.8 GHz Intel Core i7 / 16 Gb 1600 MHz DDR 3 |

| http://renoise.com/tools/paketti | BTC: 1BoZ9rvb8wT7dFNyVPwSX7DLj3stNo7844 | http://paypal.me/esaruoho |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;) http://forum.renoise.com/index.php/topic/26329-the-api-wishlist-thread/page-3#entry240266

#32 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 14 May 2011 - 15:01

Where in the code is this, what file and line? I'll write you a patch.

The convention is:

/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files
/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Instruments

For example:

/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Instruments/Vibraphone.exs
/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files/Vibraphone/*.*


The function is called 'get_samples_path' and expects three arguments: instrument_name, instrument_path, sample_filename for testing purposes. It is located around line 69 in files 'support/file_tools.lua'

Sounds like a simple check should be:

"/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files/" .. instrument_name .. "/" .. sample_filename

Is this correct? (I don't have a Mac to test) Is the path an absolute path (i.e. 'Library' is in the root dir ('/') and not in the Users home directory ('~/'))?

If so I'll also roll this into the update coming soon.

Edited by mxb, 14 May 2011 - 15:01.

Is a footer a sweater for feet?

#33 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2671 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests://Varying Interests//

Posted 14 May 2011 - 15:02

The function is called 'get_samples_path' and expects three arguments: instrument_name, instrument_path, sample_filename for testing purposes. It is located around line 69 in files 'support/file_tools.lua'

Sounds like a simple check should be:

"/Library/Application Support/GarageBand/Instrument Library/Sampler/Sampler Files/" .. instrument_name .. "/" .. sample_filename
Is this correct? (I don't have a Mac to test) Is the path an absolute path (i.e. 'Library' is in the root dir ('/') and not in the Users home directory ('~/'))?
If so I'll also roll this into the update coming soon.


It's good to have /Library and ~/Library for OSX users, just in case :)

http://lackluster.org | on Bandcamp | on YouTube | on Facebook | on Spotify | on iTunes | on TiDAL | on Soundcloud | 

http://twitter.com/esaruoho | http://esaruoho.tumblr.com | GitHubesaruoho@gmail.com | 

| macOS 10.13 High Sierra | MacBook Pro 2.8 GHz Intel Core i7 / 16 Gb 1600 MHz DDR 3 |

| http://renoise.com/tools/paketti | BTC: 1BoZ9rvb8wT7dFNyVPwSX7DLj3stNo7844 | http://paypal.me/esaruoho |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;) http://forum.renoise.com/index.php/topic/26329-the-api-wishlist-thread/page-3#entry240266

#34 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 14 May 2011 - 15:17

It's good to have /Library and ~/Library for OSX users, just in case :)


Absolute path ("/Library") has been added into the search.

The home directory library ("~/Library") is more difficult but I am currently investigating if os.getenv("HOME") works. I can test this on Linux.

If anyone has a Mac can they please go to the scripting windows terminal and type the following:

print(os.getenv("HOME"))

... and PM the results to myself.

Thanks
Is a footer a sweater for feet?

#35 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2671 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests://Varying Interests//

Posted 14 May 2011 - 16:32

If anyone has a Mac can they please go to the scripting windows terminal and type the following:

print(os.getenv("HOME"))
... and PM the results to myself.
Thanks


PM'd, but anyway, this outputs the "home folder" location on OSX, so for me it'd be /Users/esaruoho

http://lackluster.org | on Bandcamp | on YouTube | on Facebook | on Spotify | on iTunes | on TiDAL | on Soundcloud | 

http://twitter.com/esaruoho | http://esaruoho.tumblr.com | GitHubesaruoho@gmail.com | 

| macOS 10.13 High Sierra | MacBook Pro 2.8 GHz Intel Core i7 / 16 Gb 1600 MHz DDR 3 |

| http://renoise.com/tools/paketti | BTC: 1BoZ9rvb8wT7dFNyVPwSX7DLj3stNo7844 | http://paypal.me/esaruoho |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;) http://forum.renoise.com/index.php/topic/26329-the-api-wishlist-thread/page-3#entry240266

#36 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 14 May 2011 - 16:52

Okay, I've taken all the feedback from this thread so far and I'm just running a new version through it's paces before uploading to the Renoise website. It appears to work fine on Windows and I'm going to test on Linux later.

Changelog for upcoming version:

  • Workaround for AKP Akai 'drumkit style' programs
  • Additional sample search paths for OSX
  • Maybe a few additional import filters ;)

Longer term plans:

  • Adding in reading loop points from Reason NN-XT patches. I would need someone to create a set of test cases for me to investigate this. If anyone has Reason and is interested, please PM me.
  • I'd like to incorporate a tool preferences dialog that would allow users to specify a few (say 4) folders that would be searched for samples. However, I never really got along with the ViewBuilder in Renoise. If anyone else would like to start taking a look at this I'd add it into upcoming versions.

Is a footer a sweater for feet?

#37 metal

metal

    Member

  • Normal Members
  • PipPip
  • 63 posts
  • Gender:Male
  • Location:Denmark

Posted 14 May 2011 - 20:25

Why am I getting an Access Denied page when trying to download the file?

metal // vibrants

twolegs // twolegstoneworks.com


#38 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 14 May 2011 - 20:30

I've just uploaded version 1.1 to the tools page following various feedback.

I have fixed a number of bugs, the main ones are:

  • Extra CR characters causing issues on Unix based systems
  • Loading REX files will clear the instrument if required as sliced samples cannot intermix with others presently
  • Workaround for 'drumkit' instruments with akp akai programs
  • Additional folders to sample search path for OSX

Additionally, since a pure bug fix is boring, I've added some new features:

  • Support for '.s' Akai S1000/S3000 samples
  • Support for '.p' Akai S1000 programs
  • Support for '.sfz' rgc:audio SFZ instruments

Should be available to down now from the same place

Why am I getting an Access Denied page when trying to download the file?


See above :)
Is a footer a sweater for feet?

#39 metal

metal

    Member

  • Normal Members
  • PipPip
  • 63 posts
  • Gender:Male
  • Location:Denmark

Posted 14 May 2011 - 20:55

Ahh, thanks :) Thought I was doing something wrong here :)

metal // vibrants

twolegs // twolegstoneworks.com


#40 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7159 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 14 May 2011 - 21:19

The function is called 'get_samples_path' and expects three arguments: instrument_name, instrument_path, sample_filename for testing purposes. It is located around line 69 in files 'support/file_tools.lua'


I looked at the code. I propose:

  -- snip
  elseif io.exists(instrument_path .. '../Sampler Files/' .. instrument_name .."/" .. sample_filename) == true then
    return instrument_path .. '../Sampler Files/' .. instrument_name .."/"
  else
    return renoise.app():prompt_for_path("Location of samples for patch: " .. instrument_name)
  end

Forward slashes work fine on Windows. Relative to the selection works fine in my tests.

Also, read esaruoho message carefully it's not the same convention. I'm not sure why. I don't have Logic.

On an aside I've managed to crash Renoise a few times, or get a lot of "invalid file!" so ideally you can skype and "remote desktop" on an OSX machine ;) Not sure what is going on. I've made available the crash logs to the core devs.

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : MBC Archives »


#41 Brawny

Brawny

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 820 posts
  • Gender:Male
  • Location:UK

Posted 15 May 2011 - 03:15

Fantastic work, had a big pile of rex's sitting here that I hope to put to good use now. I've tried some, but I do seem to get some weird pulse wave at the end of each slice, about 20-21 samples long.. here's an example rex

*edit - I know it's a bit more niche, but I'd love to be able to load my old yamaha A3000 patches. I'm sure you just want a break now but if there's anything I can do to help, give me a holler :)

Edited by In-Fluence, 15 May 2011 - 10:52.

Sponsor me or the team!
https://www.justgivi...s/ridestoriches
Read more here:
http://www.ridestoriches.co.uk/


Soundcloud
DAW:
i7-920@4.4GHz : Gigabyte EX58A-UD3R : 6GB GSKill Eco : M-Audio Delta1010 (Rack) : ATI 5770 : Corsair Force 3 90GB SSD : 2xSeagate 500GB (RAID0) : 2x750GB (RAID1) : Korg Kontrol 49 & other MIDI kit.
Lappy: Asus C90s : E7500-3.15GHz : 4Gb RAM : 8600M GT 512MB : Fujitsu 250GB HDD

Both on W7 64 (Pro & home respectively)

https://soundcloud.com/brawneye/starkstar

Please bookmark & use this.

#42 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 15 May 2011 - 14:07

Additionally, since a pure bug fix is boring, I've added some new features:

  • Support for '.s' Akai S1000/S3000 samples
  • Support for '.p' Akai S1000 programs
  • Support for '.sfz' rgc:audio SFZ instruments


Thumbs up for the SFZ import!
I do have the idea that it somehow translate certain regions incorrect (i notice overlaps where regions really didn't overlapped).
Could that somehow be related to a Hex to decimal confusion?

If you find bug fixing boring here is another idea for the 256 sample slot limitation (i already experienced i had to fumble with SFZ libraries to kick out loads of velocity layers in order to be able to import it):
expand the routine to allow someone to import a library to multiple instruments (import each key (all velocity ranges) to a separate instrument).
This has a few advantages:not only all samples are loaded, after the import: each instrument can then be more easily dedicated to a track and with linking through the midi in option, that allows for nice track dedicated drumkit solutions.
If you want a big fat SFZ kit to play around with i can offer you a download to it.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#43 Fullofkittens

Fullofkittens

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 532 posts
  • Gender:Male

Posted 15 May 2011 - 16:22

Tested out 1.1, it's working perfectly on my akp library! You are amazing.
My music on Fwonk*
Latest on soundcloud (06-03-2011): Posture Photo 8: Counts Are Better (Cryptozoology Mix)

#44 unaHm

unaHm

    Member

  • Normal Members
  • PipPip
  • 10 posts

Posted 14 June 2011 - 20:02

vV, I agree - the inclusion of the SFZ import format is very cool!

Slightly off-topic, do you know of any batch converters that will convert SF2 to SFZ so I can import them natively to Renoise?

#45 Ahnìon

Ahnìon

    New Member

  • Normal Members
  • Pip
  • 3 posts
  • Gender:Not Telling
  • Location:Norrköping, Sweden

Posted 27 June 2011 - 15:57

Awesome tool, but the SFZ importer doesn't seem to be able to handle spaces in sample file names. :unsure:

#46 esaruoho

esaruoho

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2671 posts
  • Gender:Male
  • Location:Kontula, Helsinki, Finland
  • Interests://Varying Interests//

Posted 27 June 2011 - 19:32

Would it be possible to read .ASD files and extract transients out of that to an instrument map drumkit? :)

http://lackluster.org | on Bandcamp | on YouTube | on Facebook | on Spotify | on iTunes | on TiDAL | on Soundcloud | 

http://twitter.com/esaruoho | http://esaruoho.tumblr.com | GitHubesaruoho@gmail.com | 

| macOS 10.13 High Sierra | MacBook Pro 2.8 GHz Intel Core i7 / 16 Gb 1600 MHz DDR 3 |

| http://renoise.com/tools/paketti | BTC: 1BoZ9rvb8wT7dFNyVPwSX7DLj3stNo7844 | http://paypal.me/esaruoho |

| Latent Impulse Tracker/Scream Tracker 3/Schism Tracker <-> Renoise fanatic |

More API functions, please! ;) http://forum.renoise.com/index.php/topic/26329-the-api-wishlist-thread/page-3#entry240266

#47 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 02 July 2011 - 17:37

Awesome tool, but the SFZ importer doesn't seem to be able to handle spaces in sample file names. :unsure:


Known issue, I'm still working on this. Have to manually work around this at the moment. Sorry!

If any other tool coders can think of a simple way around this please reply to this thread.

To coders: SFZ import is in file 'instruments/rgc-sfz.lua'. The file is read and the parse table is created on lines 80 to 107. I have to split on spaces to handle the other parameters. I try to work around this for samples on lines 118-121.

Would it be possible to read .ASD files and extract transients out of that to an instrument map drumkit? :)


Well, anythings possible! I've had a look but they seem encrypted or compressed from first looks. Currently a low priority.
Is a footer a sweater for feet?

#48 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 05 July 2011 - 15:47

Known issue, I'm still working on this. Have to manually work around this at the moment. Sorry!

If any other tool coders can think of a simple way around this please reply to this thread.

To coders: SFZ import is in file 'instruments/rgc-sfz.lua'. The file is read and the parse table is created on lines 80 to 107. I have to split on spaces to handle the other parameters. I try to work around this for samples on lines 118-121.


Sometimes the solution is pretty easy. Not really neat, but it works.

[lua]
for line in io.lines(filename) do
-- strip comments to end of line
if line:find("//") then
line = line:sub(1, line:find("//")-1)
end

-- remove redundant CR on unix systems
local cr_replaced = 0
line, cr_replaced = line:gsub(string.char(13), "")

if line:find("sample=") then
for word in line:gmatch("([^%z=]+)") do
-- insert in parse table
table.insert(parse_table, word)
end
else
for word in line:gmatch("([^%z =]+)") do
-- insert in parse table
table.insert(parse_table, word)
end

end

end

[/lua]
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#49 grymmjack

grymmjack

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 148 posts
  • Gender:Male
  • Location:Detroit
  • Interests:reading, drawing, graphic design, programming, sound design, electronic music, guitar

Posted 05 February 2012 - 03:55

mxb; I have found and patched a bug in the sfz importer. I'm not sure how to relay this information to you so you can include it.

Within the sfz v2 spec there is a

<control>
default_path=

My patch simply finds the default_path and uses it as a base.

Also the current code doesn't work with spaces in filenames. I patched that as well so it does work with them.

I would like to give you this patch so you can include it, and I'm sure you have a better way to do what I did elegantly than my hacker approach :)

thanks for the Tool!

Known issue, I'm still working on this. Have to manually work around this at the moment. Sorry!

If any other tool coders can think of a simple way around this please reply to this thread.

To coders: SFZ import is in file 'instruments/rgc-sfz.lua'. The file is read and the parse table is created on lines 80 to 107. I have to split on spaces to handle the other parameters. I try to work around this for samples on lines 118-121.



Well, anythings possible! I've had a look but they seem encrypted or compressed from first looks. Currently a low priority.


Here is my hack/patch on line 119 in that file. It's not perfect, we should search for line ending instead but i couldn't get sample:gmatch("$") to work, and neither did find("\r\n") etc.:

elseif parse_table[t] == "sample" then
      local i=1
      while 
        sample:find(".wav") == nil 
        and sample:find(".aif") == nil 
        and sample:find(".flac") == nil 
      do
        sample = sample .. parse_table[t+i] .. " "
        i=i+1
      end
      sample = sample:sub(1,-2) --remove " " from end

Also we should add an intelligent detection of if there is only 1 sample found, map it for the entire keyboard. It's right now only mapping the lowest octave, I think inheriting your local defaults.
Soundgasm | DesignerMonkey | G+ | Soundcloud | spotify:user:grymmjack

#50 Beatslaughter

Beatslaughter

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2301 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:Music, Blu-ray, PC Games

Posted 05 February 2012 - 10:28

Done this sample snippet for Rick first, but thought it may help showing how to properly split a line for parsing SFZ. Insert into TestPad.lua and run it.

-----

-- extra chars = and . inserted to show proper matching
local line = "\t<region>= sample=303 Bass.Long.wav   "
print("Input: " .. line)

-- trim trailing and ending whitespace chars, %s is a pattern matching group and
-- also gets rid of any tabs
line = line:gsub("^%s*(.-)%s*$", "%1") 
print("Trim: " .. line)

-- get filename starting from last = char till end of line
local sample = line:match("([^=]+)$")
print("Sample: " .. sample)

-- get extension starting from last . char till end of line, a filename can have
-- multiple . chars
local extension = sample:match("([^.]+)$")
print("Extension: " .. extension)

-- properly check an extension at end of line
if extension == "wav" then
  print(".wav found")
elseif extension == "aif" then
  print(".aif found")
elseif extension == "aiff" then
  print(".aiff found")
elseif extension == "flac" then
  print(".flac found")
end