Super helpful thank you!
Hey @charlieroberts. Iām back with a few more questions, lol.
Iāve been exploring the integration with some Max patches and loving the results Iām getting with it.
My first question is about gaining control back via the Max gui objects after Iāve stopped the Gibberwocky control. I assumed that .clear()
would work but it doesnāt seem to be. Am I using it wrong? I tried .stop() before the clear messages but that didnāt seem to make a difference. I also tried separating the commands with a carriage return in between.
l = line( 4, 2.9, 3.1 )
message( 'ratio' ).seq( l, 2 ).clear()
l.start.seq( [2.015,3.8,4], 2 ).clear()
l.period.seq( [1/2,1], 1 ).clear()
params[ 'Slew' ].seq( [20, 30, 80], 1.99 ).clear()
Iāve also noticed one persistent bug with the graph displays for visual feedback. It consistently removes the comma after the closed bracket here:
l.start.seq( [2.015,3.8,4], 2 ).clear()
and turns it into:
l.start.seq( [2.015,3.8,4] 2 ).clear()
I then get errors on upon that when I do the next evaluation.
As always, thank you!
EDIT: Sometimes the bug seems to remove the bracket FYI
Yeah, that graph display bug is really annoying. Iāll try to see if I can fix it this week.
In regards to stopping the sequences, thereās a bit towards the end of the ābasic sequencingā tutorial that talks about how sequencers are assigned different ID numbers. Unfortunately, the tutorial doesnāt get into how you use these ID numbers, which is the info that you actually need.
In your case youāre only applying one sequence to each property, so all of them use the default ID of 0
. This means you can target them as follows:
l.start[ 0 ].stop()
l.period[ 0 ].stop()
message( 'ratio' )[ 0 ].stop()
params[ 'Slew' ][ 0 ].stop()
If you create multiple sequencers targeting properties you then need to specify individual sequence IDs, as a third parameter to any call to .seq()
, you can then use that ID to select that particular sequence for manipulation.
You can see a little bit more of this syntax for targeting sequences in the āpatterns and pattern transformationsā tutorial as well.
Ah. Brilliant thank you!
EDIT: Sorry @charlieroberts , a follow up question.
That syntax doesnāt seem to be working with sequenced params
. ie:
params[ 'Slew' ].seq( [820, 1030, 1400], 2, 0 )
params[ 'Slew' ][ 0 ].stop()
I noticed in the documentation that params
donāt have any methods mentioned. Does this explain why that doesnāt work but adding a .stop()
does? ie:
params[ 'Slew' ].seq( [820, 1030, 1400], 2, 0 ).stop()
Thanks again!
Hmmmm⦠I canāt recreate this bug. Using the gibberwocky.maxhelp patch, I can run this line from the introductory tutorial:
params['White_Queen'].seq( [10,32,64,92,127], 1 )
and then stop it with:
params['White_Queen'][0].stop()
⦠as well as restart it with a call to .start()
.
One other idea you could try⦠every call to .seq()
returns the generated sequencer object. You could store that in a variable and then use that reference to stop/start. For example:
seq = params['White_Queen'].seq( [10,32,64,92,127], 1 )
// wait some amount of time and then...
seq.stop()
Iām curious on how to implement the accumulator if you get a sec.
Iād like the second value in both of the seq arrays to accumulate by an integer of 1 each time the seq
loops. So the 1.75
and 4.8
values below:
message( 'ratio' ).seq( [1.5, 1.75], [8, 4.8] )
Should I store those values as variables and run accum on them?
Iām sure itās not right as it doesnāt work, but something like this?
one = 1.75
one.accum(1, 1.75, 5.75)
two = 4.8
two.accum(1, 4.8, 10.8)
message( 'ratio' ).seq( [1.5, one], [2, two] )
Thank you for all your help.
B
Hmmm⦠so thatās getting outside of the built-in gibberwocky functions; weāll need to write some (very short) custom JavaScript functions to make this happen. In our arrays, our second items will be functions that will return the value of variables. Then weāll create a standalone sequencer that updates those values over time.
If you havenāt done much JS before ()=>{ //some code }
is shorthand to create a function that executes a chunk of code, ()=>someValue
is even shorter and creates a function that returns a value.
value1 = 1.75
value2 = 4.8
message( 'ratio' ).seq( [1.5, ()=>value1 ], [8, ()=>value2 ] )
Seq( ()=> { value1++; value2++ }, [ 8, ()=> value2 ] ).start()
Seq
is creates a standalone sequencer object⦠these objects are created behind the scene whenever you sequence anything. In this case we explicitly create one and tell it to call a function that increments our values.
Please feel free to ask questions about this code chunk!
Better way⦠we just define a function that increments its value and then returns it.
customaccum = (val, incr=1) => {
return ()=> val += incr
}
message( 'ratio' ).seq( [1.5, customaccum(1.75) ], [8, customaccum(4.8)] )
In this example, the values increment by one by default, but you can also pass an optional second argument to customaccum to change the increment amount.
Back with two more:
-
Iām a bit confused on how to get
fade
to work. I tried this:
params[ 'VelScaleALL' ]( fade( 3, 0.63, 0.8 ) )
but I get a console message that says:socket live is not ready for messaging
which makes me fear that itās maybe a Live only command? I also tried.fade
which is clearly incorrect as well. Iām guessing that Iām just implementing it wrong but is there something similar when using Max if so? -
Is there a command to stop all of the sequencers globally?
Like a way to scriptAll sequencers stopped
?
Thanks as ever!
In regards to fade, a couple of problems. fade()
uses gen~ expressions, which means in gibberwocky.max it can only be used with the dedicated gen~ outputs of the [gibberwocky] object. But as you noted, it seems that gibberwocky is currently hardcoded to try and send messages to Live when the fade end. I can fix that (I think) but getting it to work with params
might be very difficult.
If you want to stop sequencers but leave gen~ expressions running you can use:
Seq._seqs.forEach( s => s.stop() )
Seq._seqs
basically stores all running sequences. But Iāll add a simpler global stop()
and start()
functions next time I push to the main website. Thanks for the suggestion!
Thanks @charlieroberts.
Iāve got .line
working over here with a corresponding .stop
message after the fade so all good.
And thanks on being open to the global stop idea!
Ben
Recently started diving into Gibberwocky and totally loving it, Iāve been using Max/MSP and Live on a daily basis for years now and it feels so refreshing to have access to things such as LOM and gen~ via code, the syntax is also way more appealing to me than the Haskell-y form of Tidal.
On the other hand, I was wondering if thereās any way to customize the editor (things such as cursor behaviour - I believe itās by default set on emacs mode - and theme or keymaps). I did try to get into the Atom package but am having some difficulties to get it running on Mac OS Mojave 10.14.6 (I know this is not the right thread to talk about this) and I find the local editor to be so cool anyway. I was just wondering if thereās any way to make the typing enviroment a bit more personal (thatās the only reason why Iād be looking into the Atom version).
@charlieroberts congrats for creating such a cool platform and integration, not detouring too much from my daily tools makes my live-coding(-ish) practices way more useful and intriguing
Thank you @Ste_v ! glad youāre enjoying it.
I totally understand the desire to use your own editor / personalize the editing experience, and I wish the Atom plugin worked, but I donāt think the project-owner has done anything with it in quite some time.
But you can add your own key commands like so:
Gibber.Environment.keymap['Alt-N'] = ()=> tracks[0].note(0)
If youāre looking for something like vim mode, I could add that in; itās in gibber so the port is fairly easy. If you want to try the theme system in gibber (a tiny wrapper around @neauoireās awesome theme work) and see if it works for you I could potentially add it to gibberwocky as well (although itād be a bit more work): Gibber
Can you describe the cursor behavior youād like control over?
Hello @charlieroberts and thank you for your reply!
Thanks about the hints for keymaps, that seems easy enough for me to try.
Please donāt wrap your head around themes only for my request, thatās purely an aesthetic thing Iām used to when working in IDEs and editors: some Atom themes for instance provide a clear color coding that makes easy to scan the code a bit more quickly that the current gibberwocky editor, but itās not something preventing me from enjoying the coding experience (the graphs on the screen are an amazing feature!).
Regarding the cursor, Iām simply more used to the ālineā styled cursor that doesnāt highlight the character in full (the emacs/terminal style cursor makes it a bit counterintuitive for me to instantly understand where the next typed character is gonna fall exactly - especially when editing already written lines of codes, like adding square brackets in sequence block where there werent before) but again, itās just a personal aesthetic habit I got used to
I take the chance to ask you a couple of questions:
1 - the online editor doesnāt seem able to connect to gibberwocky when in maxforlive, but the local one works fine, just wondering if thereās any drawback from using this version compared to the online one;
2 - is it normal that when editing an already going signal function (ie. a phasor controlling a filter cutoff) the graph gets āexecutedā as well, resulting in a ~gen doesn't understand p1
error? I seem to have to delete the waveform graph from the line before being able to successfully evaluate that again (the number beside the p
in that message increases/changes everytime I re-evaluate the line without removing the graph, the graph freezes and the targeted parameter stops receiving its message); Also, I found myself in the need of evaluating the function line twice in order to have it to change while already going (the function is going, I edit it -removing the graph- and evaluate again, it stops, evaluating again resumes it with the new parameters). Hopefully this makes senseā¦
I canāt really try to replicate these issues in the online editor since I donāt manage to get it to connect, Iām sure itās me whoās missing something. I installed all the required packages and am using Brave as web browser - which is based on Chromium and is the same Iām using to run the local one.
Thank you in advance for your help
Hmmm⦠in regards to number #1 the /burble editor at gibberwocky.cc works fine for me (discourse keeps replacing the link text, hereās the actual link using /burble,: Gibberwocky)
Iāll have to investigate #2. First, can you confirm youāre using /burble? Thank you!
I canāt manage to get Burble connected to maxforlive, so everything I wrote before is referring to the local editor launched by opening the index file in the gibberwocky source folderā¦
Just to clarify (and see if Iām missing something), the steps for correctly using gibberwocky are:
- install
gibberwocky
package via Max/MSP package manager; - install the
worldmaking
package via Github; - Put
gibberwocky_master.amxd
on master track andgibberwocky_midi.amxd
on any MIDI track Iām interested in controlling; - click either on
gibber.cc
orlocal
in the master instance to access local or online editor.
Hopefully Iām just missing some steps somewhere and it wonāt be hard to debug
edit - opening up gibberwocky_master.amxd
in editor I received this error in the Max console: ws failed to create server: Underlying Transport Error
that got me thinking that the issue could be caused by the fact that Iām using the Ableton Live bundled version of Max (I have it set up this way for working purposes). So I tried to switch to the standalone Max version but Burble is still unable to connect. Also, looks like in gibberwocky 1.21 the device is not frozen
edit 2 - Ok! I managed to sort out the issue with Burble, it was due to Braveās strict integrated protection protocol, which was preventing the browser from getting any communication in and out via websocket. Looks like disabling the block for the editorās page is enough to get it going. Glad to refer that I canāt reproduce most of those bugs in Burble, which is cool, but I still keep seeing graphs freezing and that p
error thing! Personally Iād love to have them āfixedā (or āverifiedā - maybe is just me getting something wrong in there, but the same code works better in Burble) in the local editor as well
Ahhh, good to hear about /burble!
Getting it fixed in the local version means updating the Max package, which means involving my partner on the project and a more drawn out process in general. Maybe if I can replicate / fix this bug youāre having now it will make more sense to start that process.
Updating /burble is just a drag and drop, so fixes tend to go there first.
At the moment the main issue hindering my use of gibberwocky is present in both editors. Iām having problems while re-evaluating lines of code controlling gen~ functions (this is what throws out the error in the screenshot I guess). When evaluating a control function - for instance track[0].volume(mod)
where mod
is assigned to a phasor(1)
- for the first time, everything is cool and I can see the graph popping out and showing me the signal. If I then decide to sequence phasor frequency like mod[0].seq([0.5, 1], 1)
and evaluate this line, nothing happens (therefore I guess I have to go back to the track[0].volume(mod)
line and evaluate that again. If I revaluate the line, I get an error telling me something like the graph being not āacceptedā as parameter and I have to delete that before re-evaluate (and to re-input the very latest )
which got deleted when the graph instanciated before). Re-evaluating the line I see a new graph popping out but itās either empty or displaying a still 1
or 0
value. The automation is also not received correctly by the controlled parameter. In order for it to work I have to delete the graph again and re-evaluate the line. Itās also natural for me to think that changing the signal values outside of that very specific control function should be enough to change its output and the waveform displaying on the graph.
Doing few researches I have found nothing related to this issue and Iām afraid Iām the one whoās doing something wrong, but canāt really figure it out⦠I tested against this issue on either Brave and Safari without success.
Thank you so much for your help!
@charlieroberts after a bit of further investigation I can add another detail to the graphs behaviour. Looks like they freeze only if I re-evaluate the line of code with ctrl
and not with shift
. Hope my report is making sense
Hmmm⦠this doesnāt happen for me. The frequency of the phasor alternates successfully and the inline visualization correctly shows the state. Iām using the following code:
mod = phasor(1)
tracks[0].volume( mod )
mod[0].seq([.5,1],1 )
⦠executed line by line with ctrl+return, and everything works as expected. Can you verify that those three lines of code work for you when executed the same way? Iām not sure what the problem could be here⦠Iām using the editor at /burble.