Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Reading Loop points from WAV file - possible?

For general discussion related FlowStone

Reading Loop points from WAV file - possible?

Postby Julian Ray » Sun Jun 30, 2019 3:39 pm

Hi,

I have a lot of WAV files with loops (made them for my Kontakt sample libraries), some of which I would like to use for my FS project. I was searching forum on this subject, but no luck.
Can anyone, please clarify if it is possible for FS to recognize WAV Loop points? If not - what would be possible solution?

Thanks!
Ray
User avatar
Julian Ray
 
Posts: 23
Joined: Tue Jun 18, 2019 2:58 pm
Location: CANADA

Re: Reading Loop points from WAV file - possible?

Postby trogluddite » Sun Jun 30, 2019 7:10 pm

Assuming the loop points are stored in the standard way for a WAV file, then yes it's possible - but not especially easy.
Ruby can read files as raw bytes, and then decode them into whatever kind of data they represent; so if you know how a file format is laid out, it's possible to decode just about anything.

I have had a play at decoding WAV files in the past, though I didn't gt particularly far. Below is the old project file, which you're free to cherry-pick if its at all useful to you - it'll give you a sense of what you'd be letting yourself in for, at least! From a cursory look, I can't tell exactly which chunks of a wav its able to read - you might get lucky and see your marker/loop data, or you might not - good luck!

WAV File Reader.fsm
(1.28 KiB) Downloaded 865 times
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Reading Loop points from WAV file - possible?

Postby Julian Ray » Sun Jun 30, 2019 7:39 pm

Thank you very much for the explanation and example - I'll definitely study it and see for how deep I can understand it :)

Cheers!
User avatar
Julian Ray
 
Posts: 23
Joined: Tue Jun 18, 2019 2:58 pm
Location: CANADA

Re: Reading Loop points from WAV file - possible?

Postby tulamide » Mon Jul 01, 2019 5:56 am

There are also two projects from KGisback, one of it specifically a wave file reader, that was quite advanced. But you would need to use the search function (or Google's site search) to find it, because I forgot about the title.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Reading Loop points from WAV file - possible?

Postby adamszabo » Mon Jul 01, 2019 11:05 am

its better if you search for "KG_is_back", thats the username ;)
adamszabo
 
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Reading Loop points from WAV file - possible?

Postby Julian Ray » Mon Jul 01, 2019 3:33 pm

Thanks guys, I'll search it right now :)
User avatar
Julian Ray
 
Posts: 23
Joined: Tue Jun 18, 2019 2:58 pm
Location: CANADA

Re: Reading Loop points from WAV file - possible?

Postby acg2010 » Wed Jul 03, 2019 3:44 pm

Not sure if this would be of any use but while researching SDR, I came across this reference to parsing a wav in C.

http://truelogic.org/wordpress/2015/09/ ... file-in-c/

Maybe can glean some helpful hints, or convert code to assembler maybe, idk.
acg2010
 
Posts: 80
Joined: Tue Oct 05, 2010 3:18 am

Re: Reading Loop points from WAV file - possible?

Postby Spogg » Wed Jul 03, 2019 6:01 pm

I don’t know if this could help trog to modify his Ruby code, but I’ve attached a short WAV which does loop nicely, and a screenshot of the Wavosaur properties which show the loop start and end samples.

I imagine agc2010 wants only the loop sample values for a player.

Cheers

Spogg
Attachments
Looping WAV with loop points info.zip
(369.72 KiB) Downloaded 838 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Reading Loop points from WAV file - possible?

Postby trogluddite » Wed Jul 03, 2019 10:02 pm

Thanks for the example file, Spogg, and for the code example, agc2010 (I would have included the research links from my old project - but they were all broken!)

Having had a bit more of a look at my old code, I think that extracting the other data "chunks" should be possible by adding their structures to the table at the beginning. I'll need to think a bit more about the parser though, as I don't think it will handle tables nested within tables properly yet; and if I remember the WAV format correctly, loop points require cross-referencing data from two different "chunks". Coincidentally, one of my current projects is a MIDI SysEx decoder which does exactly the same kind of memory-mapped data extraction - it's a similar enough problem that I may well end up with code that can be re-used here.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Reading Loop points from WAV file - possible?

Postby guyman » Sun Jul 28, 2019 8:11 pm

Can we write Loop points TO a wav file?
User avatar
guyman
 
Posts: 207
Joined: Fri Mar 02, 2018 8:27 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 65 guests