Widi audio > midi, Bomes midi triggered text output

qdqd

2014-09-12 09:08:57

Hello,

i am new to bomes and I am trying to achieve something that bomes is not specifically made for:

I want my macbook to slowly write a text message into whatever running program is active (for example textedit). This event should be triggered by incoming audio through the line in. Any incoming audio (using a microphone and speech to trigger)

I already managed to convert the line input to midi notes with Widi and route those midi notes as an input to Bomes. Now the problem is that Bomes constantly triggers the keystroke output for each incoming midi note resulting in my text output to be written a thousand times.

Any midi note should be triggering the keystroke output but only the first note so the text is writte just once.
I need the keystrokes to be hit one by one with a 0,5sec time inbetween.

For example I do a surprise party. The birthday person is coming in. Everyone shouts happy birthday!! This noise gets into the microphone and triggers "HAPPY BIRTHDAY" being written on a projection in the room. Since its 14 keystrokes the message will be written in 7 seconds (0,5 sec inbetween each stroke).

Ok i know this is a total workaround method but i cant think of any other method to do this.

Can anybody think of a way to accomplish this with bomes?

Thank you guys in advance

DvlsAdvct

2014-09-13 22:06:56

Hi qdqd

What you want to do is definitely doable, but it is (understandably) a little complicated. What we need to do is use a timer that triggers every 500ms, and only triggers once. There is a rub there, though. We can set it so it does not trigger again until the message has completed being sent, and then it will send again once the necessary MIDI message is received. That make sense? The big thing is we need to know how many characters you need to send, so we can dictate how many times the timer repeats. For example, if you were to want to type Happy Birthday!, it would look something like:

Code: Select all

Translator 1: Incoming Audio
Incoming Message: 90 30 7F
Rules: if g0!=0 then exit rules, skip outgoing action
g1=1
Outgoing Action: Timer: Birthday 0ms delay, Repeat 500ms delay Repeat 15 Times

Translator 2: Birthday Timer
Incoming Message: Birthday Timer
Rules: g1=g1+1
Outgoing Message: None

Translator 3: B Timer
Incoming Message: Birthday Timer
Rules: if g1!=1 then exit rules, skip outgoing action
Outgoing Message: Keystroke (SHIFT) B

Translator 4: i Timer
Incoming Message: Birthday Timer
Rules: if g1!=2 then exit rules, skip outgoing action
Outgoing Message: Keystroke i
and continue on until you get to the exclamation point. That one will look like:

Code: Select all

Translator 17: ! timer
Incoming Message: Birthday Timer
Rules: if g1!=15 then exit rules, skip outgoing action
g0=0
g1=0
Outgoing Message: Keystroke !
Does that make sense?
Jared