Osc.send command with beatmatching to the music

55 views
Skip to first unread message

Kevin Groom

unread,
Jun 24, 2019, 10:00:39 AM6/24/19
to Lightjams
Hi, I am trying to complete a project which uses the Lightshark Core and Lightjams.
I need the Lightjams music analyzer to detect beats and pass the values to the LS.Core Playback faders.

I can only seem to get my commands to work when I feed in a Sine or Sawtooth input, The light intensity responds instantly.
I use this command:

 osc.send(1), sin (3) *2.55 and the lights respond

I thought I could replace this with something such as osc.send(1), onbeat.1 *2.55 ) or similar to make the lights dance in time to the music.
But it doesnt work.

Is there a suggested method of achieving this?
Thanks in advance



Mathieu

unread,
Jun 24, 2019, 3:22:22 PM6/24/19
to Lightjams
Are you trying to use music.1.beat?

Mathieu

unread,
Jun 24, 2019, 3:23:11 PM6/24/19
to Lightjams
Make sure there's actually a music input in the 1st slot. Go in the view/configuration and check under the music tab.

Kevin Groom

unread,
Jun 24, 2019, 4:50:49 PM6/24/19
to ligh...@googlegroups.com
Yes theres definitely music playing in the first slot. Either my loopback audio or ASIO comes through fine and the power meter bounces along to the beat.

Then i write osc.send(1)music.1.beat and the beat of the lights does not follow the music accurately. 

All I want to do is have the 
music playing and outputting kick drum transients making the lighys flash in time. 

its such a good app im sure its easy but i cant work out how to do it:)

On Mon, 24 Jun 2019, 20:23 Mathieu, <mat...@lightjams.com> wrote:
Make sure there's actually a music input in the 1st slot. Go in the view/configuration and check under the music tab.

--
You received this message because you are subscribed to the Google Groups "Lightjams" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightjams+...@googlegroups.com.
To post to this group, send email to ligh...@googlegroups.com.
Visit this group at https://groups.google.com/group/lightjams.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightjams/b3be5404-8b47-4f02-a065-06b5a1977579%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mathieu

unread,
Jun 24, 2019, 5:18:37 PM6/24/19
to ligh...@googlegroups.com
If I understand correctly, you need to send OSC to a specific address and that's why you use osc.send, right?

When trying a formula, test it step by step. That means, test it without OSC at first. Otherwise, you'll get lost, like even experienced developers get lost.

So select a source, click on its power slider, click on the music icon, and select the frequency band you want to track and the beat option. Once this works, click on the nuclear icon to see the generated formula. Then add the osc.send(1, ...) part.

You should end up with something like: 

osc.send(1, trigger(music.1.beat,0.1,10,30,0.2))

Kevin Groom

unread,
Jun 24, 2019, 5:53:12 PM6/24/19
to ligh...@googlegroups.com
Yes indeed i'd like to get the Playback fader on my Lightshark DMX interface to respond to the transients from my music inputs. I have set an Osc extra channel to control this specific channel. The fader moves when I set it to a floating value woth osc.send (1,255) but i couldnt get the osc.send and music detection to work at the same time. The line you wrote makes this combination of functions possible I hope;) every time i set the.music input correctly onto the power slider my Command line script disappears. I will try your solution tomorrow thanks. 

The value I hope too send should be between 0-255 range for the intensity.  Is there a command i can add to your line to get a range from 0-255 as an improvement from the 0-100 I seem to be limited to?

Your product and support are truly exceptional keep up the superb work;)



On Mon, 24 Jun 2019, 22:18 Mathieu, <mat...@lightjams.com> wrote:
If I understand correctly, you need to send OSC to a specific address and that's why you use osc.send, right?

When trying a formula, test it step by step. That means, test it without osc at first. Otherwise, you'll get lost, like even experience developers get lost.

So select a source, click on its power slider, click on the music, and select the frequency band you want to track and the beat option. Once this works, click on the nuclear icon to see the generated formula. Then add the osc.send(1, ...) part.

You should end up with something like: 

osc.send(1, trigger(music.1.beat,0.1,10,30,0.2))

--
You received this message because you are subscribed to the Google Groups "Lightjams" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightjams+...@googlegroups.com.
To post to this group, send email to ligh...@googlegroups.com.
Visit this group at https://groups.google.com/group/lightjams.

Mathieu

unread,
Jun 24, 2019, 6:33:26 PM6/24/19
to Lightjams
I think you're typing invalid formulas. That why when you come back, the formula reverts to the previous working formula.

To send a value between 0-255, multiply by 2.55 as you were doing.

Kevin Groom

unread,
Jun 27, 2019, 7:55:04 AM6/27/19
to Lightjams
Ok we've nearly got it right now Mathieu:)

yes I have been confused with how the Formula disappears if you reselect a slider or an Audio input and my syntax has sometimes been missing a bracket so it deletes it.Strangely sometimes it accepts the formulas but still doesnt output OSC to my "extra out" LS/Level/PB/6".

I have found that putting brackets in around my (*2.55) multiplier has fixed it:)

My working formula for beat match to Low frequencies is currently :
osc.send(1,trigger(music.1.low.beat,0.05,1,1,0,05)*2.55)

I would love any advice on getting this tighter to the Kick drum of around 100 HZ and below if anyone knows a more precise formula:)

By the way I want to pay for the licence do I have to use paypal or can I use a standard Uk Debit card at checkout, I haven't joined paypal. How else can I pay:)

Kevin Groom

unread,
Jun 27, 2019, 7:57:47 AM6/27/19
to Lightjams
also It would be nice if in the formula such as mine there was a clear description of what these values "beat,0.05,1,1,0,05)" actually determine please Mathieu. I cant find these variables described clearly within help, cheers:)

Mathieu

unread,
Jun 27, 2019, 9:40:41 AM6/27/19
to ligh...@googlegroups.com
>> any advice on getting this tighter to the Kick drum of around 100 HZ 

You can adjust the lower and upper frequencies by going in the view/configuration and then under the music tab.

>> It would be nice if in the formula such as mine there was a clear description of what these values

Put the cursor over the trigger function to see its parameters. You can also click the help button or go here: https://www.lightjams.com/commandline.html

>>  do I have to use paypal or can I use a standard Uk Debit card at checkout

You can pay with a credit card, without a paypal account. 

Kevin Groom

unread,
Jun 27, 2019, 9:44:29 AM6/27/19
to Lightjams
Hi,

I noticed that the lower and upper frequency range is actually 1-500HZ at its lowest and this is too much of a range to get a simple kick drum beat I need something nearer 80 - 120 HZ I think. Is this achievable? I will process the order after I get this frequency analysis dialled in. Thanks


On Thursday, June 27, 2019 at 2:40:41 PM UTC+1, Mathieu wrote:
>> any advice on getting this tighter to the Kick drum of around 100 HZ 

You can adjust the lower and upper frequency by going in the view/configuration and then under the music tab. See the settings for every music input.

>> It would be nice if in the formula such as mine there was a clear description of what these values

Put the cursor over the trigger function to see the parameters. You can also click the help button or go here: https://www.lightjams.com/commandline.html

Mathieu

unread,
Jun 27, 2019, 9:57:46 AM6/27/19
to ligh...@googlegroups.com
>> I noticed that the lower and upper frequency range is actually 1-500HZ at its lowest and this is too much of a range to get a simple kick drum beat 

You have 20 frequency bands to cover 500 Hz, so it should be precise enough. In your formula, instead of using the low frequencies with music.1.low, use music.1.band(1) or the band the closest to 80 Hz. It should be the 4th band at 86 Hz. When looking at the spectrum when you click the music icon to link a slider to the music, put your mouse over a band in the detailed spectrum to see the frequency range.

At this point, your formula should be:

osc.send(1, trigger(music.1.bandbeat(4),0.1,10,30,0.2)*2.55)

You could also configure the lower frequency to be 80Hz and the music.1.low should span about 80Hz to 129Hz.

Edit: Your previous formula still is invalid. I've corrected it but you may want to double-check to make sure you understand 
Reply all
Reply to author
Forward
0 new messages