Q: Emulating Radio Music on nw2s::b?

Discussion, support, and resources for our noise making modules and kits.

Moderators: Kent, scottwilson

Post Reply
User avatar
myecholalia
Wiggling with Experience
Posts: 378
Joined: Mon Jan 21, 2013 10:26 am
Location: Singapore

Q: Emulating Radio Music on nw2s::b?

Post by myecholalia » Fri Jan 02, 2015 1:40 am

interested in your guidance on this. i know the "b" plays samples no problem, but in terms of interacting with them, the concept of the Music Thing Radio Music is highly intriguing to me.

therefore, i'd like to try having a similar experience on the "b" with multiple samples "playing" like radio stations at the same time while hearing only one of them. then, one of the knobs would switch between stations and one of the switches would reset playback. being able to cv-control both things would be awesome. mimicking also other features of the Music Thing would be the icing on the cake but not really necessary.

do you think this would be possible? any tips on how to develop that on the b? maybe i need to get into arduino programming after all.

User avatar
Tombola
Super Deluxe Wiggler
Posts: 1877
Joined: Sun Jan 23, 2011 11:33 am
Location: London, England

Post by Tombola » Fri Jan 02, 2015 4:10 am

Don't know about your libraries, but the only remotely non-trivial things I did were...
- Play SD file from a specific point - I actually play from the modulo of the start point and the file length, so it starts in the middle if asked to start after the end of the file
- Return the specific point at which the current file is playing
- Then obviously you just sniff where the current file is playing, then stop that file and start a different file from that point.
- The second knob sets an arbitrary start point; read the pot (average/smooth it a bit) then map 0-1024 on the pot to 0-filelength and use that as the trigger point instead of 'where the other file stopped playing.

The most difficult things were getting hot-swapping of SD cards right, and loading and storing directories properly. At the moment it loads the whole directory for the entire card into memory, which isn't at all necessary

Also, at the moment I'm using .raw files rather than .wav files, because it makes it easier if you don't have to skip the headers at the start of each file.

The code is all in standard Arduino and CC licensed: https://github.com/TomWhitwell/RadioMusic
Last edited by Tombola on Fri Jan 02, 2015 6:29 am, edited 1 time in total.

User avatar
myecholalia
Wiggling with Experience
Posts: 378
Joined: Mon Jan 21, 2013 10:26 am
Location: Singapore

Post by myecholalia » Fri Jan 02, 2015 5:56 am

@Tombola thanks a ton for chiming in! will have a look at your code and try to make sense of it.
thankful for any additional hints from people more savvy in coding for the "b" than me (which should be everybody here) :hihi: :tu:

User avatar
scottwilson
Wiggling with Experience
Posts: 432
Joined: Mon Sep 16, 2013 12:54 pm

Post by scottwilson » Fri Jan 02, 2015 6:35 am

Yeah, if you're not on the 1.1 branch (which few are) then you'd know that the sample player supports a few different playback modes now. Most of them are focused on glitchy playback or providing the ability to sequence loops. Adding "radio" mode would be fairly trivial as Tom says - it's basically just modular arithmetic.

Videos and documentation will come soon. I had hoped to get a little further over the break, but spent most of the time 1. completely rewiring my studio with a couple of 'io modules and 2. completely rebuilding my workshop to make it a little easier to start ramping up production of a couple of new modules (and the balanced 'io upgrades)

-s

Post Reply

Return to “nw2s”