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

How to "trigger" a wav file?

For general discussion related FlowStone

Re: How to "trigger" a wav file?

Postby billv » Thu May 09, 2013 7:22 am

Perfect Human Interface wrote:That would be "convolution."

thanks for the tip, was wondering what you were up to :)
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: How to "trigger" a wav file?

Postby VPDannyMan » Thu May 09, 2013 6:00 pm

I think tzarls has the answer... if not then C++..
VPDannyMan
 
Posts: 118
Joined: Mon Jan 04, 2010 4:50 am

Re: How to "trigger" a wav file?

Postby billv » Thu May 09, 2013 8:48 pm

VPDannyMan wrote:I think tzarls has the answer..

Sounds good.....but how is it done..???? :?
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: How to "trigger" a wav file?

Postby Perfect Human Interface » Thu May 09, 2013 10:43 pm

billv wrote:
VPDannyMan wrote:I think tzarls has the answer..

Sounds good.....but how is it done..???? :?


I'm trying to figure out how to trigger the wave to play using the stock "Wave Player" module... haven't a clue what's going on. :( I don't even know how to get the darn connections out of mono and into poly mode.

Now I keep trying to strip down this "drum pad" schematic that someone else made to upload here as an example of sending a trigger to play the wave, but every time I cut out the module and paste it into the top level it just stops working... even after undoing. :?

Anyways here it is a couple modules deep. I don't understand how this works. If you open up the "midi to poly" module you can set the number of voices to enable overlap though.
Attachments
Drum Pad with velocity EDIT.fsm
(87.65 KiB) Downloaded 912 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: How to "trigger" a wav file?

Postby tester » Thu May 09, 2013 11:01 pm

Shouldn't you add there "midi in select" module, connect it (red wire) to the place where you have inactive wireless connector, and select at least a PC keyboard?

BTW, bcause I see "not" prim floating free. If you want to use boolean true/false options, then there is a green boolean switch to do this. "not" prim just inverts what comes in (if nothing connected, then input = 0; so by default it outputs 1, not "not").
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: How to "trigger" a wav file?

Postby Perfect Human Interface » Thu May 09, 2013 11:16 pm

tester wrote:Shouldn't you add there "midi in select" module, connect it (red wire) to the place where you have inactive wireless connector, and select at least a PC keyboard?

BTW, bcause I see "not" prim floating free. If you want to use boolean true/false options, then there is a green boolean switch to do this. "not" prim just inverts what comes in (if nothing connected, then input = 0; so by default it outputs 1, not "not").


What I just uploaded was something I ripped out of another schematic. The point being that chunk of components does what we're looking for (just click the trigger button I stuck in there), so if someone can wrap their head around that better than I can maybe that example will help.

Oh dammit. I just tried opening that schematic in a fresh project and now (again) it won't work. I'm sorry guys, I think FS is just plain broken here.

Here's the original unmodified schematic (again not by me).
Attachments
Drum Pad with velocity.fsm
(126.15 KiB) Downloaded 941 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: How to "trigger" a wav file?

Postby nix » Fri May 10, 2013 6:35 am

I think keep trying.
I don't really want to make this,
coz it sounds like u will end up just with a wall of sound,
but there are 2 ways u can do it I think.
Prolly easiest is to use midi.
You can do this with a Ruby codebox,
or the MIDI event prim.
Both of these can be automated, the limit of triggers you will have is
the ruby max(limited by cpu), which is about 1000 per sec.
Is this enough?
Anyway, the doohickey I am using to trigger is a green tick,
automation is via timers(ruby or prim).
I think this is a good project to learn from,
but as I say I don't really want one of these.
I recommend using the MIDI way.
The other is to do the whole thing in stream.
One piece of information that's needed is-
MIDI note on is status 144,
and note off is 128--
if u choose to use MIDI.
The stream method would be samplerate, ie. 44100 triggers per sec
If there is a musical context for this,
(please explain convolution a bit more maybe?)
I can get my hands dirty
Anyway,
Here is a MIDI note on trigger controlled by a bool->
note on trigger.fsm
(59.19 KiB) Downloaded 941 times

Hope helps- and don't give up, keep asking questions!
It is certainly do-able
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: How to "trigger" a wav file?

Postby Perfect Human Interface » Fri May 10, 2013 8:41 am

Hey Nix, thanks a lot for the input.

Just to be perfectly clear, convolution isn't the only thing I had intended for this, but if we could pull that off it would be pretty sweet!

Now as far as what convolution is, essentially it's a type of reverb, so yes it's relevant in a musical context. The process here involves taking an impulse response (typically a recording of an impulse or sharp sound in a reverberating space) and an input signal, then for every sample of the input signal, playing a copy of the impulse response with its level multiplied by the value of that sample (positive or negative, so negative values would invert polarity). This would create a "wet" signal so you can mix it with the dry signal at whatever levels you please.

So yes, we are talking triggering waves at sample rate, which could amount to having hundreds of thousands of copies of the wave playing at once.

...that said, I would be happy at this point with a simple module that could load a wav and play it back (once) at a trigger input.

Edit: In addition to weirder effects, convolution can also be used to recreate the "character" of specific analog gear, which I've never tried before, but could be useful!
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: How to "trigger" a wav file?

Postby nix » Fri May 10, 2013 8:58 am

hmm,
this one doesn't play it once,
it's determined by the length punched in to the windows timer.
I'll think about how to play the full length of the sample man.
Anyway, here is the trigger note on->
note on trigger_0.fsm
(277.28 KiB) Downloaded 942 times
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: How to "trigger" a wav file?

Postby billv » Fri May 10, 2013 9:58 am

Perfect Human Interface wrote:Here's the original unmodified schematic
]
Yeh, this works just fine......
Perfect Human Interface wrote: Drum Pad with velocity EDIT.fsm

Didn't get chance for deep look, but your right ,it's not happening....
If you want to keep working it this way..
ScreenShot221.png
ScreenShot221.png (14.83 KiB) Viewed 14746 times

... i suggest using the SM Sampler(I think I got this from the wiki)
SM Sampler.fsm
(192.39 KiB) Downloaded 930 times

Aslo my "Drum Machine" In examples has it in their as well, so if your still stuck on how to use
the SM sampler, check it out.http://www.dsprobotics.com/support/viewtopic.php?f=3&t=1336#p4808
nix wrote:I don't really want to make this,
coz it sounds like u will end up just with a wall of sound

Yeh Nix, can see what you mean. It's just that the general idea that PHI is implying, reminds me a bit of
the way the two main X11 osc's are built.
Only five waves, but they are triggered over time to create a new sound....
ScreenShot222.png
ScreenShot222.png (7.04 KiB) Viewed 14746 times
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 84 guests