uiGraphic: 4 breakpoints and a keyboard #391
Replies: 49 comments 70 replies
-
Hi, glad to help but not sure I fully understand so indeed with a picture it will be easier. The key is to set your rules then you are good to go:
Good luck! |
Beta Was this translation helpful? Give feedback.
-
hiya goodweather, thanks -ok, here's that demo panel: uiTestGraph v04 4breakpoints.zip (*.panel with no external resources) this is junk atm. just trying some initial ideas, gathering the strands together. there's a uiTabs with some other wavedraw stuff on the tab1 - these were D110 pulsewidth graphics; included to remind me there are different ways to write the xy coordinates stuff (which i 'borrowed' from any panel i could get a look at in 2017-8 ! ) hope link works and that it loads in whichever Ctrlr version you are currently using. i'm still using 5.3.201 (2016) -don't know what compatibility issues i might have loading previous projects (try it, i guess... ?) - or what benefits/changes with latest version.(?) note that it's not really 'zones' as i implied initially. there's no high/low range. it's just 4 points, with levels. -if you consider what the |
Beta Was this translation helpful? Give feedback.
-
thanks @dnaldoog for jmax ! that's very cool. think i need to figure out where to put it, to keep controls and graph in sync. (only just saw zip file; how do you do attachments here?) - what is jmax doing mathmatically? and what is going on internally in the Yamaha TG55? ...funny old bird, the TG55: only has 74 waveforms, minuscule ROM, and takes waveform cards. later came the TG500 with more wave ROM, more effects, more editables, but looks like same sort of thing, with 4 'elements' (eg: 'partials') each with dual filter/filterEG/filter scaling etc.) -got it locally for cheap because i wanted the memory card :P for another cheap Yamaha, the TG33 -which is.. a bit of a monster. haven't had much time with either; are they complementary? dunno. both make me think i should try a TG77 sometime. (or an EX5/7) - and so i started idly structuring a panel - in a way thinking/rethinking about how i could re-do the D-110 panel: some good stuff there, but it became a jumble - because it focused on the 'Tone' rather than looking at the entire device, which exists as a 'Patch', of the 8 Parts. the TG55 is has separate modes for Voice/Multi, but the 'tone'/'voice' has some similarities, in a different configuration. i'm very curious to see what these criss-crossing dual filter envelope graphs and levelscaling curves will deliver, with the combinations of filter modes. ;-) i would quite like to master draggable envelopes. some other time, once this is resolved; think dasfaker had this working with something. |
Beta Was this translation helpful? Give feedback.
-
ok, so jmax is very nice (did actually read what it did but had mind elsewhere when i posted. want to try 1,2,3,4) - but there, it is in 'paintGraph' which only paints the graph, and doesn't affect the modulators and their values. i now need to figure out where to put it, so that it's already 'done' by the time it reaches 'paintGraph' . |
Beta Was this translation helpful? Give feedback.
-
@dnaldoog @dobo365 edit:lol i've already had to clear my Roaming folder once -just like old times :D except i knew what to do this time when Ctrlr wouldn't boot hehe (not a problem if using no ext resources: zip size = 38kb :-) ) don't quite grasp the 'source' thing, had a look. what's that? also: custom index ... shall i start/find another thread about that? i use it for randomising, as copied from someone else, but only seem to have ONE index, as far as i can see. it looked like i could define several 'indices', numerically, but that didn't work. eg: i only have a single index count i can use, afaics i messed around with colours, fill, transparency, just to have a look. wondered if other line formulas could be used, tan/cos/sine/exp/log etc. :D |
Beta Was this translation helpful? Give feedback.
-
oh i see, re: 'source' - eg: source of the value change. yes i was observing that: some 4 and 5 and a bit of 6. taking note of that, for more reading, as i was wondering about setValue( )/setModulatorValue( )/setPropertyInt( ) differences ( and apparently, there are more). i do have a little concern that this setup might end up sending loads of midi values when it's done. the 'output' display looks stable; it is the modulator value display that is jumpy - at this point, just trying to get L<>R behaviour sorted. a couple of other issues mentioned there: issues when having multiple panels loaded, interfering with each other (i think i had a notion of why this was happening, and have definitely had conflicts where i could not load two panels together, or one needing/running better when loaded alone -but made no attempt to resolve it, just accepted it as part of how Ctrlr environment works/something i did not have a clear overview of, at that point) - and: modulators interfering with each other, when they shouldn't; there's a good example of it in that panel i just uploaded: the 'old' waveform draw controls in the small tab are interfering with the 'paintGraph( )' -i haven't bothered to look for the cause of that, because i'll remove those eventually. i've downloaded the files in that thread to have a look at (best way to learn/transfer info imo), and latest version of your JD990. definitely going to have a look at drawing some curvy lines when i've got this breakpoint thing sorted and imported over to the panel it is intended for. had a quick look at Winamp AVS visualisation plugin editor yesterday - that can be fun to mess around with, if you start with a fresh preset and add simple things gradually. so there seem to be some formulae there, but then i wondered what might already be in JUCE, and also started googling standard formulas (and then you get a pile of results, with different versions, confusing). just going to start simple with this ! if i can get a little curve at some point, i'll be happy for now :-) in the above example, changing colours with the 'fill' draw, i had to include the colour definition within the loop, doing a loop for each section like that - meaning it's performed as many times as iterations of the loops. don't think it matters very much. (just wanted to see how it could be done, what it looks like) aaand...i've forgotten how to combine arguments. if i want to 'top & tail', defining jmax() and jmin() in one argument. i was impressed that the randoms came out in the correct order - i didn't think that would work (haven't analysed why, too much, have just been playing around with it, and cleaning up, adding little bits). also have to try a jmax(1,2,3,4) - and maybe set a 'max' on the bp#s that are going over 127. wondering many times what the Yamaha engineers have done internally in the firmware :-D (and what happens when editing from front panel, which i'll try today.) |
Beta Was this translation helpful? Give feedback.
-
@dnaldoog |
Beta Was this translation helpful? Give feedback.
-
meh, it's probably just my end, i have to close some panels. i have that 'sequencer' panel open, it seems to cause issues ;-) am looking at your Lua with great interest!!! (you seem to be very liberal with capitals: i thought that was to be avoided?) phiiii-uuuu... having to duck, all the stuff flying over my head, in there :-) |
Beta Was this translation helpful? Give feedback.
-
yeh, all the modulator names are in caps. not objecting, was just curious, as i thought we were supposed to favour lowercase(?) |
Beta Was this translation helpful? Give feedback.
-
oh i like the filter curve display 👍 oh ye-eah, the display colour/brightness/etc controls... :-) ..and it seems locked, re: selecting modulators -?- |
Beta Was this translation helpful? Give feedback.
-
jlimit(lower limit,upper limit,value to constrain) ? a-ha: This will check that the specified value lies between the lower and upper bounds specified, and if not, will return the nearest value that would be in-range. Effectively, it's like calling: jmax (lowerLimit, jmin (upperLimit, value)) Note that it expects that lowerLimit <= upperLimit. If this isn't true, the results will be unpredictable." |
Beta Was this translation helpful? Give feedback.
-
jlimit( ) appears to do the same as jmax(lower, jmin(upper, value)) it now 'shunts' from the right, sweeping neighbouring breakpoints to the left, resulting in 0,1,2,3 values -was sweeping to the right with jmax( ), and stacking them all on the same apparent value 127, but actually trying to give values 127,128,129,130 at 'output' display. from the left/lower, it is blocked by the next breakpoint it encounters. i was hoping to have this in both directions. don't know if i have to do the +1/-1 but it seems to behave better like this. it can set up a kind of looping behaviour when values conflict otherwise. |
Beta Was this translation helpful? Give feedback.
-
apologies, it isn't 2s complement (i had to deal with that with an EMU module, and i think it was explained in the manual). and not for the offset parameters, which are a straightforward v1,v2/msb 0-1/lsb 0-127/0-255 count.
and there are a few parameters with the same thing; rate scaling, velocity, amplitude modulation sens(?). for 0-255, do i just do xx,yy, in the value byte part? (this is what i found in the OG template for this device) |
Beta Was this translation helpful? Give feedback.
-
ha you're going faster than me ;o) i've just downloaded your panel above (have to run off to work right now; serious pre-festive pressure to get something finished :-/ ) things have come along a lot over here at Ctrlr ! 'source' seems to have become a big thing -pretty sure it wasn't being mentioned 3 yrs ago. (good to use as a trigger condition for my paintgraph( ) -seems to need something-) i need to memorise what those sources are. i have to digest what you've just posted: so, bit.band(value,x) ...is that in the JUCE repository? haven't seen that before. and here: ... __index = function(t, k) - so you've chucked in a little function there? and run it? why does the function name start with "_" ? what's going on there? i've been starting to take this back into the main TG55 panel - which has had a nice symmetry shaping up.. until now when i decide to let the 640 width of the breakpoint thing dictate overall wiDth... sudden anxiety over whether i should follow this, or keep to original dimensions :aargh: - the aim is to make a very simple (optimally simple) generic panel of an instrument, including all the little tricks like hide menu and zoom (which, incidentally, i reckon should be in the upper part of the panel, ideally left, but i'm using a rightside strip for general navigation - because it's possible to zoom to where you can't reach the controls.. so i'm thinking of a minimize/reset/ 2x,3x kind of thing, not very different from what you have on the JD990 panel but up in the corner somewhere) - and stuff like that (reckon myLittleSequencer could be made to send out midi notes? :-) implement an arpeggiator? :heh: ) yup i think, with everyone's indulgence, a recapulative (?real term?) thread on various forms of loops, as a revision aid ... can we upload/post direct links to images here? |
Beta Was this translation helpful? Give feedback.
-
stepped back from that for a bit: got jlimit working consistently - shunting both ways but not overlapping; will do for now. instead, i've been experimenting with those dotted lines, drawing a kind of pianoroll 👍 |
Beta Was this translation helpful? Give feedback.
-
oo yes, let me steal that code :D ... this morning's task, let's get that into the panel, and see what happens. i used the term 'pianoroll' very loosely; maybe 'note grid'. i hadn't really anticipated making one :lol: so everything is a bonus. side note: (re: sequencer project on the other thread) am realising how a 'tb-303' type sequencer is very different from the regular 'row sequencer': pitch selection depends on a note-on event, stepping through a list of pitches. and i assume ties can only occur after a note-on? eg: couldn't do: rest-tie-rest ? and could at some point involve MouseGrab again - which i've failed to grasp so far (after a couple of quick attempts). edit: have been possessed of mad notion that it might be possible to make something for the Behringer TD3 ... there's a page where someone has analysed the data output of the TD3, and it looks like patterns are dumped/loaded as hex (wouldn't want to mess with other settings atm) so it could be done in theory. on the other hand, why bother when Behringer provide their synthtool editor. so it's more to see how far i can get with that, getting the basics sorted out. |
Beta Was this translation helpful? Give feedback.
-
ok here's my attempt at that :-) (wrong way up note order) : |
Beta Was this translation helpful? Give feedback.
-
(will have another go at posting the method in a mo', didn't go as planned) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
i did this: (having trouble posting code atm) ` local comp,g=component,graphics
` ` local hexcolour = 0x88FFFFFF
` |
Beta Was this translation helpful? Give feedback.
-
i liked this (from dnaldoog), multiple variable declaration, in a single declaration: `for k = 1, h, ydiv do
end` and was wondering if tables could be treated in the same way, with each 'key' having several parameters/values, separated by commas -? (ha i still can't post code correctly, edited that three times) |
Beta Was this translation helpful? Give feedback.
-
It's been a while since I made that pianoBar but I think the reason I went with a memoryBlock was that I used some memoryBlocks already. It's just that, a placeholder. Maybe it had something to do that I had to start at 0. And Tables start at 1 if I remember correctly. Let's just say it was for convenience sake. Anyway.. a test panel as promised. Used a MemoryBlock and a Table. It proves my point that the table starts at 1 because I do: noteTxt[notesAm+1] to make the numbers start at block 2. I'm lazy right now so I didn't make it all relative but otherwise, the panel would scale nicely if you made the component bigger or smaller. Sometimes it's better to do that from the get-go because I like to resize my components later on. And to top it off.. I nice curved line. |
Beta Was this translation helpful? Give feedback.
-
and here's that curvy line with 'node' and thickness controls, for experimentation. |
Beta Was this translation helpful? Give feedback.
-
some interesting-looking stuff in JUCE graphics class reference. ( drawImageWithin ... ) (and some totally useless stuff : fillCheckerBoard ... ?? ) |
Beta Was this translation helpful? Give feedback.
-
absolutely, i shall. so i need to pull it back to the original topic : getting those 4 breakpoints to behave. (which i shall address later if i may; have been enjoying cubicTo experiments. i have fuller perspective on cubicTo now, as i figured out from your code how to position the start point, using the bit you ren-ed, which is an extra x,y pair, and that works now. maybe i can start several subpaths, or iterate multiples of the same shape. ' g:setColour(Colour(0xFF00FF00)) |
Beta Was this translation helpful? Give feedback.
-
lol this thread is a mess; here's the image of the scaled note grid: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
ok.. try this; i hope it's the right version; should load ok. (i worked on from this the other day, without reloading and checking after moving stuff, and it all ended up snafu :P ) this is the sequencer thing, adapting notebar method: note: there's an issue with the 'memory' state: it's loading with a pattern, as if there's a ghost memory there: if you press the memory showed, it just jumps back to default empty pattern. has to be written first, with the write button. also getting this with 'last state' for random operation. some form of initialize/setup needed. (btw: 'slide' is called 'velo' - because it was a quick changeover, didn't sort it out yet.) |
Beta Was this translation helpful? Give feedback.
-
sorry folks, having a little recess to sort something out. |
Beta Was this translation helpful? Give feedback.
-
hi folks, i'm trying to resolve a little issue:
i want to represent 4 keyboard breakpoints with a graphic display, using uiCustomComponent (with Lua methods eg: paintGraph, repaintGraph, as used commonly in several panels).
these are 'Level Scaling' breakpoints 1,2,3,4 (0-127/C-2 - G8), each with 'offset' (-/+127, 0-255 msb/lsb).
and i have it working, except for one problem: the breakpoint zones cannot, of course, overlap, and each consecutive 'zone' 1-4 cannot go lower than the one to its left. the default/initial values for each are: midi note#36/55/76/96 - giving default/init spacings of: 36/19/21/20/32.
the graph drawing was quite easy, just had to define x0,x1,x2,x3,x4,x5, with 1,2,3,4 being the breakpoint parameter values, and y values defined by the offset amount parameter.
the problem is stopping the x values from overlapping.
i considered addressing the "modulatorMin"/"modulatorMax" parameters, in order to limit their range continuously, with "modulatorValue" - and although i'm getting encouraging results - eg: some sort of response - it is jumpy and unreliable. my code is pretty rubbish anyway, brute force hack ! :-) and i'm sure there's a more elegant erudite way of doing this.
the other way would be maths/some sort of comparator and affecting the modulatorValue before it 'gets to the graph drawing bit'.
at the moment, i can sort of limit the individual breakpoints, with the adjacent breakpoints, but the graph can zing all over the place.
i will upload a little demo panel later when i've cleaned it up a bit (and figured out how to upload here, or a link to download)
i'm concluding that some way of moderating values before they get to the modulator is going to be the way to resolve this, and keep the graphic following the values simply - but i don't know how yet. any ideas? wait for the panel...back later.
Beta Was this translation helpful? Give feedback.
All reactions