09-20-2019, 11:32 AM
#201
Human being with feelings
Join Date: Jan 2009
Location: Curaçao
Posts: 410
Could droplet have the option to only output one note at the time so when I use a mono synth I can experiment with droplet for melodies. Just thought I'd ask 😄
09-24-2019, 06:12 AM
#202
Human being with feelings
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 348
Quote:
Originally Posted by
mplay
Could droplet have the option to only output one note at the time so when I use a mono synth I can experiment with droplet for melodies. Just thought I'd ask 😄
That's an interesting idea. I think it might be more flexible to have a separate "polyphony limit" effect placed after Droplets.
I don't know if one already exists, but
here's one I just knocked together . Set it to "1" for monophonic output.
Geraint
Last edited by geraintluff; 09-24-2019 at 06:23 AM .
09-24-2019, 06:42 AM
#203
Human being with feelings
Join Date: Jan 2009
Location: Curaçao
Posts: 410
Awesome! It's playing in the background as I'm typing, now all I have to do is wait and I have my hit record
09-24-2019, 11:21 AM
#204
Human being with feelings
Join Date: Jan 2009
Location: Curaçao
Posts: 410
I have to say it's pretty fun, I've modulated the rate, Independence and regularity to slowly change and just have it playing in the background. Like a monkey banging on a typewriter, eventually something nice comes out, lol
12-17-2019, 07:40 AM
#205
Human being with feelings
Join Date: Oct 2018
Posts: 138
Hi, first of all saying thanks for such awesome plugins!
I've been using ZynAddSubFX for a long time. Since it's a 32 bit "plugin" (in fact it's a bridge from the original software) I'm moving on to PadSynth. I really love how simple and powerfull it is at the same time. But today I've realized that the default generated sample seems to have an issue (I think something zero-crossing related) because a little "click" can be listened in a periodic time.
Could it be fixed?
Thanks for all,
Gonzalo
02-10-2020, 10:46 AM
#206
Human being with feelings
Join Date: Oct 2019
Posts: 232
Hi Geraint, firstly I think your effects/plugins are amazing, keep up the good work !
I've been trying to get your midi harmony to work, but I'm struggling as there doesn't seem to be much documentation / videos on how to make use of it. I've tried creating my own pattern, but as there are no grid lines for the pitch it's hard to set it so it is the original pitch (or even any other pitch, you have to guess). You may want to think about adding rows/grid lines where the notes can slot in to a particular pitch, so the centre row would be the original for example?
Also I was hoping to do more complex things, for example I could enter a pattern for a bass line but I can't get the note to sustain more than one 'beat' / tick. For example if I wanted a bass line where the first note is a dotted note, I can't get it to 'hold' that first note.
I've posted a request in the forum to find something that does a kind of 'auto accompaniment' like the yamaha/casio keyboards, and where we can create our own patterns:
https://forum.cockos.com/showthread....=1#post2243081
and your 'midi harmony' seems to be nearly what I want, although I am struggling to get it to work for different pattern variations.
Any help on this subject would be appreciated, thanks.
02-11-2020, 09:33 AM
#207
Human being with feelings
Join Date: Apr 2019
Posts: 36
Apologies if I've missed it in this thread but I've downloaded the zip file. How to I install the effects so reaper sees them?
02-11-2020, 09:45 AM
#208
Human being with feelings
Join Date: Oct 2019
Posts: 232
Quote:
Originally Posted by
Fingers mcginty
Apologies if I've missed it in this thread but I've downloaded the zip file. How to I install the effects so reaper sees them?
Check the top of this page:
https://geraintluff.github.io/jsfx/
02-11-2020, 11:30 AM
#209
Human being with feelings
Join Date: Apr 2019
Posts: 36
Could you be a bit more specific?
I need to know where to place the files in my windows based system.
02-11-2020, 01:15 PM
#210
Human being with feelings
Join Date: Apr 2019
Posts: 36
Never mind ...I got it sorted
02-12-2020, 03:36 AM
#211
Human being with feelings
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 348
Quote:
Originally Posted by
GonZ
I'm moving on to PadSynth. [...] the default generated sample seems to have an issue (I think something zero-crossing related) because a little "click" can be listened in a periodic time.
That's odd. I don't get that - could you send me a rendered version? (Email's in my profile.)
02-12-2020, 04:44 AM
#212
Human being with feelings
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 348
Quote:
Originally Posted by
dahya
I've been trying to get your midi harmony to work, but I'm struggling as there doesn't seem to be much documentation / videos on how to make use of it. I've tried creating my own pattern, but as there are no grid lines for the pitch it's hard to set it so it is the original pitch (or even any other pitch, you have to guess).
Yeah, I didn't get around to making a video for this - sorry for that.
The pitch sequence isn't relative, it's absolute (similar to Droplets). The sequence uses the centre and a range to select a target note/range, and then it rounds that to the nearest "allowed" note. In the display at the top, you can see the "allowed" notes in grey, and the active notes in orange.
So if your range is set to "C4 / 12st", then the pattern will produce target notes will be in the range C3-C5. It then approximates these notes as best it can, using the allowed notes from the input.
Quote:
Originally Posted by
dahya
Also I was hoping to do more complex things, for example I could enter a pattern for a bass line but I can't get the note to sustain more than one 'beat' / tick. For example if I wanted a bass line where the first note is a dotted note, I can't get it to 'hold' that first note.
Ah yeah - that would be cool. Instead of having pitch/vel, it would be neat to be able to specify some time-steps as "sustain".
What you could try is the "MIDI" option for Target. Basically, instead of relying on the in-built sequence, you specify your own sequence using a different MIDI channel (16 by default). This lets you put any pattern you like in there, and change them over time etc.
I just recorded a
(quite rough!) demo for you, to illustrate how that can work:
https://youtu.be/emfZvlxiJkU - apologies for the very loud mouse-clicks.
VIDEO
I forgot to say in the video, but one important detail is that if two notes in the "target" input are back-to-back but end up rounding to the same output note, then it will just continue that note. So, if you need them to be separate, you have to leave a bit of space at the end of each note.
Geraint
Last edited by geraintluff; 02-12-2020 at 06:30 AM .
02-12-2020, 04:50 AM
#213
Human being with feelings
Join Date: Oct 2019
Posts: 232
Wow, that's great, thanks for that GeraintLuff, I was actually going to ask you about using a midi input for the sequences instead ! I'll take a look at this later today and see how it goes, and thanks for taking the time out to do the video too, much appreciated.
02-12-2020, 09:49 AM
#214
Human being with feelings
Join Date: Oct 2019
Posts: 232
Quote:
Originally Posted by
geraintluff
What you could try is the "MIDI" option for Target. Basically, instead of relying on the in-built sequence, you specify your own sequence using a different MIDI channel (16 by default). This lets you put any pattern you like in there, and change them over time etc.
I just recorded a
(quite rough!) demo for you, to illustrate how that can work:
https://youtu.be/emfZvlxiJkU - apologies for the very loud mouse-clicks.
VIDEO
I forgot to say in the video, but one important detail is that if two notes in the "target" input are back-to-back but end up rounding to the same output note, then it will just continue that note. So, if you need them to be separate, you have to leave a bit of space at the end of each note.
Geraint
Hi Geraint, many thanks for producing the video, however I don't think I've been able to replicate what you're doing in the video properly yet. From what I can understand, the set up you have in the video is as follows (please correct me where I am wrong):
Track Contents:
Track 1 - Synth
Track 2 - MIDI Harmony plugin
Track 3 - 'Allowed Chords'
Track 4 - 'Target Sequence'
Track Routing:
Track 4 ('Target Sequence') on MIDI Channel 16 --> Track 2 (MIDI Harmony plugin )
Track 3 ('Allowed Chords') on MIDI Channel 1 --> Track 1 (Synth)
Track 2 (MIDI Harmony plugin) on all MIDI Channels --> Track 1 (Synth)
MIDI Harmony Plug Set up:
Target = MIDI
Control Channel = Channel 16
Have I got this routing correct? I'm not sure where Track 3 ('Allowed Chords') should be routed to?
Thanks for your assistance.
Dahya
02-13-2020, 01:42 AM
#215
Human being with feelings
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 348
Quote:
Originally Posted by
dahya
Track Routing:
Track 4 ('Target Sequence') on MIDI Channel 16 --> Track 2 (MIDI Harmony plugin )
Track 3 ('Allowed Chords') on MIDI Channel 1 --> Track 1 (Synth)
Track 2 (MIDI Harmony plugin) on all MIDI Channels --> Track 1 (Synth)
Ah, there's your issue. The Allowed Chords also needs to be sent to MIDI Harmony. Without that, I expect MIDI Harmony will output nothing, and the synth will be playing the chords you sent it directly.
Here's the example project from the video:
https://stash.reaper.fm/v/38293/MIDI...ny%20demo2.RPP . I tend to use implicit routing using nested-tracks, because I find it easier. The only tricky bit is the "target sequence" track, which has its "send to parent" disabled.
A more compact version (which represents how I actually use it) is here:
https://stash.reaper.fm/v/38295/MIDI...%20compact.RPP - in this one, the "allowed chords" are on the main track itself (which contains both MIDI Harmony and the synth. It uses this very simple
"MIDI Channel Cast" effect to move the "target sequence" to channel 16 without any weird routing.
Regardless of how it's arranged, this should be the overall pattern:
Allowed Chords -> MIDI Harmony, on channel 1
Target Sequence -> MIDI Harmony, on channel 16
MIDI Harmony -> synth
Sorry for the fuss, and lack of video - MIDI Harmony isn't my most polished effect, so I appreciate you putting it through its paces!
Geraint
02-13-2020, 03:58 PM
#216
Human being with feelings
Join Date: Oct 2019
Posts: 232
Ok, so I've tried the demo2 project and that works fine, thanks. Also tried the Compact version project, and I get no sound - there's midi data being input and output, but no sound. If I add a different synth (and disable the Humonica) then that works.
So I think I get the idea of the routing now, and I think I can get it to work, but it seems that there's more to it than that. For example, trying to use a bass pattern as the 'target sequence', and I noticed that it only seems to work properly if I set the 'Shift' to 'Up Only'. Whereas if I have chords in the 'target sequence', then 'Shift' = up/down works better.
Also, sometimes a particular chord in a sequence (from the 'Allowed Chords') becomes the same chord as the previous one, eg if the sequence is C, Am, G, it seems to produce C, C, G....I don't know why..?
I think what we need is some explanations of what each control is supposed to do, and what the plugin is trying to do, so we know what to expect and if it works as expected.
I kind of like the idea of the plugin, but I'm struggling to get it work as I think it should work...
02-17-2020, 09:10 AM
#217
Human being with feelings
Join Date: Feb 2015
Posts: 755
That MIDI Harmony plugin will be quite useful.
It kinda reminds me of Bitwig's Harmony Tool, but better.
VIDEO
02-17-2020, 11:50 AM
#218
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Midi Harmony, sounds great, thanks for sharing, how is the difference to midi vocoder? If there should be any significant difference, one can imagine what will be the result of midi harmony + midi vocoder then?
02-17-2020, 11:58 AM
#219
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Quote:
Originally Posted by
geraintluff
Here's the example project from the video:
https://stash.reaper.fm/v/38293/MIDI...ny%20demo2.RPP . I tend to use implicit routing using nested-tracks, because I find it easier. The only tricky bit is the "target sequence" track, which has its "send to parent" disabled.
I also prefer nested track style, I should say mega nested
, that is why I created folderify. This is kind of a hack for achieving modular routing to some degree, and you can record each routing point as midi or audio, if you want.
VIDEO
https://www.youtube.com/watch?v=8Jbod_BCw5k
03-24-2020, 09:40 PM
#220
Human being with feelings
Join Date: Nov 2018
Posts: 61
Hey, Geraint! How difficult would it be to make a more customizable version of Piano Display?
I'd LOVE to be able to cut off a couple octaves from the left and right side of the keyboard. In other words, zoom in on the part of the keyboard that I'm using. I poked around in the JSFX file myself, but found that the highlighted keys didn't follow my edits to the keyboard
Some other cool features:
- disable note name labels, and labels for each C octave
- slow down the note scroll speed
- change colors
I'd gladly donate, even for just the keyboard resize function!
03-24-2020, 10:57 PM
#221
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Quote:
Originally Posted by
pingosimon
I'd gladly donate, even for just the keyboard resize function!
This should be easy just by replacing some hard values with variables which any user could set somewhere, at the top usually.
You could replace all
127 with n * 12 - 1
128 with n * 12
and defining n = 5, at the top if you want only 5 octaves. For other octaves accordingly.
Here a quick test.
PHP Code:
desc : Piano Display ( by Geraint Luff ) in_pin : none out_pin : none import ui - lib . jsfx - inc import piano - ui . jsfx - inc import synth - framework - obj . jsfx - inc @ init freemem = 0 ; freemem = ui_setup ( freemem ); freemem = synth_setup ( freemem ); synth_setup_each ( synth1 ); synth_setup_each ( synth2 ); synth_setup_each ( synth3 ); synth_setup_each ( synth4 ); synth_setup_each ( synth5 ); synth_setup_each ( synth6 ); synth_setup_each ( synth7 ); synth_setup_each ( synth8 ); synth_setup_each ( synth9 ); synth_setup_each ( synth10 ); synth_setup_each ( synth11 ); synth_setup_each ( synth12 ); synth_setup_each ( synth13 ); synth_setup_each ( synth14 ); synth_setup_each ( synth15 ); synth_setup_each ( synth16 ); attack_samples = 0.01 * srate ; release_samples = 0.01 * srate ; @ block synth_block (); synth_block_each ( synth1 ) && synth_block_each ( synth2 ) && synth_block_each ( synth3 ) && synth_block_each ( synth4 ) && synth_block_each ( synth5 ) && synth_block_each ( synth6 ) && synth_block_each ( synth7 ) && synth_block_each ( synth8 ) && synth_block_each ( synth9 ) && synth_block_each ( synth10 ) && synth_block_each ( synth11 ) && synth_block_each ( synth12 ) && synth_block_each ( synth13 ) && synth_block_each ( synth14 ) && synth_block_each ( synth15 ) && synth_block_each ( synth16 ); @ sample function process_note ( note *) ( synth_sample_each ( note ) ? ( synth_release ( note ) >= 0 ? ( synth_stop ( note ); ); ); synth_continue ( note ); ); process_note ( synth1 ) && process_note ( synth2 ) && process_note ( synth3 ) && process_note ( synth4 ) && process_note ( synth5 ) && process_note ( synth6 ) && process_note ( synth7 ) && process_note ( synth8 ) && process_note ( synth9 ) && process_note ( synth10 ) && process_note ( synth11 ) && process_note ( synth12 ) && process_note ( synth13 ) && process_note ( synth14 ) && process_note ( synth15 ) && process_note ( synth16 ); @ gfx 1168 170 n = 5 ; PIANO_ROLL_SCREEN = 1 ; PIANO_ROLL_PERIOD = 1 ; ui_reserve_image ( PIANO_ROLL_SCREEN ); function set_colour ( note *) ( ui_color ( 255 * synth_velocity ( note )/( n * 12 - 1 ), 255 *( 1 - synth_velocity ( note )/( n * 12 - 1 )), 255 ); ); function draw_note ( note *) ( synth_on ( note ) ? ( set_colour ( note ); piano_fill_key ( synth_midinote ( note ), 0 , ( n * 12 - 1 )); piano_push_key ( synth_midinote ( note ), 0 , ( n * 12 - 1 )); ui_color ( 0 , 0 , 0 ); piano_key_name ( #note, synth_midinote(note)); ui_text ( #note); ui_pop (); ); synth_continue ( note ); ); function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) ( synth_on ( note ) ? ( set_colour ( note ); left = g_w * synth_midinote ( note )/( n * 12 ) + 0.5 ; gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels ); ); synth_continue ( note ); ); ui_start ( "main" ); ui_screen () === "main" ? ( ui_split_bottom ( ui_width ()* 0.0728 ); piano_draw ( 0 , ( n * 12 - 1 )); draw_note ( synth1 ) && draw_note ( synth2 ) && draw_note ( synth3 ) && draw_note ( synth4 ) && draw_note ( synth5 ) && draw_note ( synth6 ) && draw_note ( synth7 ) && draw_note ( synth8 ) && draw_note ( synth9 ) && draw_note ( synth10 ) && draw_note ( synth11 ) && draw_note ( synth12 ) && draw_note ( synth13 ) && draw_note ( synth14 ) && draw_note ( synth15 ) && draw_note ( synth16 ); ui_pop (); gfx_dest = PIANO_ROLL_SCREEN ; gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h ); g_w != ui_width () || g_h != ui_height () ? ( gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ()); gfx_r = gfx_g = gfx_b = 0 ; gfx_a = 1 ; gfx_rect ( 0 , 0 , g_w , g_h ); ); g_t = time_precise (); g_dt = g_t - g_t_old ; g_t_old = g_t ; pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h ); gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels ); gfx_r = gfx_g = gfx_b = 0 ; gfx_rect ( 0 , g_h - pixels , g_w , pixels ); draw_roll_note ( synth1 , g_w , g_h , pixels ) && draw_roll_note ( synth2 , g_w , g_h , pixels ) && draw_roll_note ( synth3 , g_w , g_h , pixels ) && draw_roll_note ( synth4 , g_w , g_h , pixels ) && draw_roll_note ( synth5 , g_w , g_h , pixels ) && draw_roll_note ( synth6 , g_w , g_h , pixels ) && draw_roll_note ( synth7 , g_w , g_h , pixels ) && draw_roll_note ( synth8 , g_w , g_h , pixels ) && draw_roll_note ( synth9 , g_w , g_h , pixels ) && draw_roll_note ( synth10 , g_w , g_h , pixels ) && draw_roll_note ( synth11 , g_w , g_h , pixels ) && draw_roll_note ( synth12 , g_w , g_h , pixels ) && draw_roll_note ( synth13 , g_w , g_h , pixels ) && draw_roll_note ( synth14 , g_w , g_h , pixels ) && draw_roll_note ( synth15 , g_w , g_h , pixels ) && draw_roll_note ( synth16 , g_w , g_h , pixels ); gfx_dest = - 1 ; gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ()); control_finish_technical (); ui_color ( 255 , 255 , 255 , 0.3 ); ui_border (); );
You might also want some additional shifting.
03-24-2020, 11:14 PM
#222
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Quote:
Originally Posted by
pingosimon
- slow down the note scroll speed
I divided pixels by 10, 10 times slower, adjust to your taste.
PHP Code:
pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 10 );
03-25-2020, 04:35 PM
#223
Human being with feelings
Join Date: Nov 2018
Posts: 61
Awesome! Can I tip you a few bucks?
Here's my edit.
- Replaced some "0" with "24" to start the keyboard at C1 instead of C-1.
- Removed the note name on key press. (Still can't figure out how to remove all the "C" labels)
- Made the keyboard a bit taller by editing this part:
PHP Code:
ui_screen () === "main" ? ( ui_split_bottom ( ui_width ()* 0.15 );
-Watch out, your replacement of all "255" with "n*12-1" edited the colors, too! So I changed them back. (Some knobs for this would be cool!)
PHP Code:
function set_colour ( note *) ( ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 ); );
One problem: the scrolling notes are not aligned to the keys now. I can't find that setting...
PHP Code:
desc : Piano Display ( by Geraint Luff ) in_pin : none out_pin : none import ui - lib . jsfx - inc import piano - ui . jsfx - inc import synth - framework - obj . jsfx - inc @ init freemem = 0 ; freemem = ui_setup ( freemem ); freemem = synth_setup ( freemem ); synth_setup_each ( synth1 ); synth_setup_each ( synth2 ); synth_setup_each ( synth3 ); synth_setup_each ( synth4 ); synth_setup_each ( synth5 ); synth_setup_each ( synth6 ); synth_setup_each ( synth7 ); synth_setup_each ( synth8 ); synth_setup_each ( synth9 ); synth_setup_each ( synth10 ); synth_setup_each ( synth11 ); synth_setup_each ( synth12 ); synth_setup_each ( synth13 ); synth_setup_each ( synth14 ); synth_setup_each ( synth15 ); synth_setup_each ( synth16 ); attack_samples = 0.01 * srate ; release_samples = 0.01 * srate ; @ block synth_block (); synth_block_each ( synth1 ) && synth_block_each ( synth2 ) && synth_block_each ( synth3 ) && synth_block_each ( synth4 ) && synth_block_each ( synth5 ) && synth_block_each ( synth6 ) && synth_block_each ( synth7 ) && synth_block_each ( synth8 ) && synth_block_each ( synth9 ) && synth_block_each ( synth10 ) && synth_block_each ( synth11 ) && synth_block_each ( synth12 ) && synth_block_each ( synth13 ) && synth_block_each ( synth14 ) && synth_block_each ( synth15 ) && synth_block_each ( synth16 ); @ sample function process_note ( note *) ( synth_sample_each ( note ) ? ( synth_release ( note ) >= 0 ? ( synth_stop ( note ); ); ); synth_continue ( note ); ); process_note ( synth1 ) && process_note ( synth2 ) && process_note ( synth3 ) && process_note ( synth4 ) && process_note ( synth5 ) && process_note ( synth6 ) && process_note ( synth7 ) && process_note ( synth8 ) && process_note ( synth9 ) && process_note ( synth10 ) && process_note ( synth11 ) && process_note ( synth12 ) && process_note ( synth13 ) && process_note ( synth14 ) && process_note ( synth15 ) && process_note ( synth16 ); @ gfx 1168 170 n = 7 ; PIANO_ROLL_SCREEN = 1 ; PIANO_ROLL_PERIOD = 1 ; ui_reserve_image ( PIANO_ROLL_SCREEN ); function set_colour ( note *) ( ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 ); ); function draw_note ( note *) ( synth_on ( note ) ? ( set_colour ( note ); piano_fill_key ( synth_midinote ( note ), 24 , ( n * 12 - 1 )); ); synth_continue ( note ); ); function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) ( synth_on ( note ) ? ( set_colour ( note ); left = g_w * synth_midinote ( note )/( n * 12 ) + 0.5 ; gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels ); ); synth_continue ( note ); ); ui_start ( "main" ); ui_screen () === "main" ? ( ui_split_bottom ( ui_width ()* 0.15 ); piano_draw ( 24 , ( n * 12 - 1 )); draw_note ( synth1 ) && draw_note ( synth2 ) && draw_note ( synth3 ) && draw_note ( synth4 ) && draw_note ( synth5 ) && draw_note ( synth6 ) && draw_note ( synth7 ) && draw_note ( synth8 ) && draw_note ( synth9 ) && draw_note ( synth10 ) && draw_note ( synth11 ) && draw_note ( synth12 ) && draw_note ( synth13 ) && draw_note ( synth14 ) && draw_note ( synth15 ) && draw_note ( synth16 ); ui_pop (); gfx_dest = PIANO_ROLL_SCREEN ; gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h ); g_w != ui_width () || g_h != ui_height () ? ( gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ()); gfx_r = gfx_g = gfx_b = 0 ; gfx_a = 1 ; gfx_rect ( 0 , 0 , g_w , g_h ); ); g_t = time_precise (); g_dt = g_t - g_t_old ; g_t_old = g_t ; pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 7 ); gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels ); gfx_r = gfx_g = gfx_b = 0 ; gfx_rect ( 0 , g_h - pixels , g_w , pixels ); draw_roll_note ( synth1 , g_w , g_h , pixels ) && draw_roll_note ( synth2 , g_w , g_h , pixels ) && draw_roll_note ( synth3 , g_w , g_h , pixels ) && draw_roll_note ( synth4 , g_w , g_h , pixels ) && draw_roll_note ( synth5 , g_w , g_h , pixels ) && draw_roll_note ( synth6 , g_w , g_h , pixels ) && draw_roll_note ( synth7 , g_w , g_h , pixels ) && draw_roll_note ( synth8 , g_w , g_h , pixels ) && draw_roll_note ( synth9 , g_w , g_h , pixels ) && draw_roll_note ( synth10 , g_w , g_h , pixels ) && draw_roll_note ( synth11 , g_w , g_h , pixels ) && draw_roll_note ( synth12 , g_w , g_h , pixels ) && draw_roll_note ( synth13 , g_w , g_h , pixels ) && draw_roll_note ( synth14 , g_w , g_h , pixels ) && draw_roll_note ( synth15 , g_w , g_h , pixels ) && draw_roll_note ( synth16 , g_w , g_h , pixels ); gfx_dest = - 1 ; gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ()); control_finish_technical (); ui_color ( 255 , 255 , 255 , 0.3 ); ui_border (); );
Last edited by pingosimon; 03-26-2020 at 04:44 PM .
03-26-2020, 12:32 AM
#224
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Quote:
Originally Posted by
pingosimon
-Watch out, your replacement of all "255" with "n*12-1" edited the colors, too! So I changed them back. (Some knobs for this would be cool!)
Where did I write this?
03-26-2020, 04:45 PM
#225
Human being with feelings
Join Date: Nov 2018
Posts: 61
Oh sorry, I meant your replacement of 127
The original plugin has
PHP Code:
function set_colour ( note *) ( ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 ); );
But your edit had
PHP Code:
function set_colour ( note *) ( ui_color ( 255 * synth_velocity ( note )/( n * 12 - 1 ), 255 *( 1 - synth_velocity ( note )/( n * 12 - 1 )), 255 ); );
Last edited by pingosimon; 03-26-2020 at 04:57 PM .
03-26-2020, 04:58 PM
#226
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Yes, but I did not replace 255 anywhere, only 127, as you can see.
03-26-2020, 05:01 PM
#227
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Ok, I see, there it needs to stay at 127, you say, ok, could be. Cool you discovered this, I just quickly tried and posted, did not try anything much.
03-26-2020, 05:38 PM
#228
Human being with feelings
Join Date: Nov 2018
Posts: 61
No big deal! It still works with n*, the colors just changed a little bit. But since it was unintended, I figured, better to leave it as in the original.
03-27-2020, 10:49 AM
#229
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Alignment problem you still have? Is your above code your latest version you are using now?
03-27-2020, 10:59 AM
#230
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Here my friend, when you shift min, you should also shift max. Now notes aligned again and showing 7 octaves, as you wanted it seems.
PHP Code:
desc : Piano Display ( by Geraint Luff )
in_pin : none
out_pin : none
import ui - lib . jsfx - inc
import piano - ui . jsfx - inc
import synth - framework - obj . jsfx - inc
@ init
freemem = 0 ;
freemem = ui_setup ( freemem );
freemem = synth_setup ( freemem );
synth_setup_each ( synth1 );
synth_setup_each ( synth2 );
synth_setup_each ( synth3 );
synth_setup_each ( synth4 );
synth_setup_each ( synth5 );
synth_setup_each ( synth6 );
synth_setup_each ( synth7 );
synth_setup_each ( synth8 );
synth_setup_each ( synth9 );
synth_setup_each ( synth10 );
synth_setup_each ( synth11 );
synth_setup_each ( synth12 );
synth_setup_each ( synth13 );
synth_setup_each ( synth14 );
synth_setup_each ( synth15 );
synth_setup_each ( synth16 );
attack_samples = 0.01 * srate ;
release_samples = 0.01 * srate ;
@ block
synth_block ();
synth_block_each ( synth1 )
&& synth_block_each ( synth2 )
&& synth_block_each ( synth3 )
&& synth_block_each ( synth4 )
&& synth_block_each ( synth5 )
&& synth_block_each ( synth6 )
&& synth_block_each ( synth7 )
&& synth_block_each ( synth8 )
&& synth_block_each ( synth9 )
&& synth_block_each ( synth10 )
&& synth_block_each ( synth11 )
&& synth_block_each ( synth12 )
&& synth_block_each ( synth13 )
&& synth_block_each ( synth14 )
&& synth_block_each ( synth15 )
&& synth_block_each ( synth16 );
@ sample
function process_note ( note *) (
synth_sample_each ( note ) ? (
synth_release ( note ) >= 0 ? (
synth_stop ( note );
);
);
synth_continue ( note );
);
process_note ( synth1 )
&& process_note ( synth2 )
&& process_note ( synth3 )
&& process_note ( synth4 )
&& process_note ( synth5 )
&& process_note ( synth6 )
&& process_note ( synth7 )
&& process_note ( synth8 )
&& process_note ( synth9 )
&& process_note ( synth10 )
&& process_note ( synth11 )
&& process_note ( synth12 )
&& process_note ( synth13 )
&& process_note ( synth14 )
&& process_note ( synth15 )
&& process_note ( synth16 );
@ gfx 1168 170
n = 7 ;
PIANO_ROLL_SCREEN = 1 ;
PIANO_ROLL_PERIOD = 1 ;
ui_reserve_image ( PIANO_ROLL_SCREEN );
function set_colour ( note *) (
ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 );
);
function draw_note ( note *) (
synth_on ( note ) ? (
set_colour ( note );
piano_fill_key ( synth_midinote ( note ), 24 , ( n * 12 - 1 + 24 ));
);
synth_continue ( note );
);
function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) (
synth_on ( note ) ? (
set_colour ( note );
left = g_w * synth_midinote ( note )/( n * 12 ) + 0.5 ;
gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels );
);
synth_continue ( note );
);
ui_start ( "main" );
ui_screen () === "main" ? (
ui_split_bottom ( ui_width ()* 0.15 );
piano_draw ( 24 , ( n * 12 - 1 + 24 ));
draw_note ( synth1 )
&& draw_note ( synth2 )
&& draw_note ( synth3 )
&& draw_note ( synth4 )
&& draw_note ( synth5 )
&& draw_note ( synth6 )
&& draw_note ( synth7 )
&& draw_note ( synth8 )
&& draw_note ( synth9 )
&& draw_note ( synth10 )
&& draw_note ( synth11 )
&& draw_note ( synth12 )
&& draw_note ( synth13 )
&& draw_note ( synth14 )
&& draw_note ( synth15 )
&& draw_note ( synth16 );
ui_pop ();
gfx_dest = PIANO_ROLL_SCREEN ;
gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h );
g_w != ui_width () || g_h != ui_height () ? (
gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ());
gfx_r = gfx_g = gfx_b = 0 ;
gfx_a = 1 ;
gfx_rect ( 0 , 0 , g_w , g_h );
);
g_t = time_precise ();
g_dt = g_t - g_t_old ;
g_t_old = g_t ;
pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 7 );
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels );
gfx_r = gfx_g = gfx_b = 0 ;
gfx_rect ( 0 , g_h - pixels , g_w , pixels );
draw_roll_note ( synth1 , g_w , g_h , pixels )
&& draw_roll_note ( synth2 , g_w , g_h , pixels )
&& draw_roll_note ( synth3 , g_w , g_h , pixels )
&& draw_roll_note ( synth4 , g_w , g_h , pixels )
&& draw_roll_note ( synth5 , g_w , g_h , pixels )
&& draw_roll_note ( synth6 , g_w , g_h , pixels )
&& draw_roll_note ( synth7 , g_w , g_h , pixels )
&& draw_roll_note ( synth8 , g_w , g_h , pixels )
&& draw_roll_note ( synth9 , g_w , g_h , pixels )
&& draw_roll_note ( synth10 , g_w , g_h , pixels )
&& draw_roll_note ( synth11 , g_w , g_h , pixels )
&& draw_roll_note ( synth12 , g_w , g_h , pixels )
&& draw_roll_note ( synth13 , g_w , g_h , pixels )
&& draw_roll_note ( synth14 , g_w , g_h , pixels )
&& draw_roll_note ( synth15 , g_w , g_h , pixels )
&& draw_roll_note ( synth16 , g_w , g_h , pixels );
gfx_dest = - 1 ;
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ());
control_finish_technical ();
ui_color ( 255 , 255 , 255 , 0.3 );
ui_border ();
);
03-27-2020, 11:16 AM
#231
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Quote:
Originally Posted by
pingosimon
- Removed the note name on key press. (Still can't figure out how to remove all the "C" labels)
File "piano-ui.jsfx-inc" change line 63 to:
PHP Code:
format = ( octaveKey === 0 ) ? "" //"C%i"
We just comment out the printing using //, replacing it with empty String "".
Have fun my friend. No tips necessary, thanks a lot, I count it given, your offer is already more than enough.
03-27-2020, 02:00 PM
#232
Human being with feelings
Join Date: Nov 2018
Posts: 61
Thanks, you're awesome! Editing piano-ui worked. I've heard of "commenting out" code before, but never done it. (I should do that with my other note name edit, instead of just deleting it).
Alignment is still off though:
Last edited by pingosimon; 03-27-2020 at 02:18 PM .
03-27-2020, 03:23 PM
#233
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Alignment finally corrected, hopefully, sorry still for the mistake in it before, I recognized it a bit later, I thought it is already perfect, where it was not.
I modified this line, just for information, put parenthesis and -24.
left = g_w*(synth_midinote(note)-24)/(n*12) + 0.5;
PHP Code:
desc : Piano Display ( by Geraint Luff ) in_pin : none out_pin : none import ui - lib . jsfx - inc import piano - ui . jsfx - inc import synth - framework - obj . jsfx - inc @ init freemem = 0 ; freemem = ui_setup ( freemem ); freemem = synth_setup ( freemem ); synth_setup_each ( synth1 ); synth_setup_each ( synth2 ); synth_setup_each ( synth3 ); synth_setup_each ( synth4 ); synth_setup_each ( synth5 ); synth_setup_each ( synth6 ); synth_setup_each ( synth7 ); synth_setup_each ( synth8 ); synth_setup_each ( synth9 ); synth_setup_each ( synth10 ); synth_setup_each ( synth11 ); synth_setup_each ( synth12 ); synth_setup_each ( synth13 ); synth_setup_each ( synth14 ); synth_setup_each ( synth15 ); synth_setup_each ( synth16 ); attack_samples = 0.01 * srate ; release_samples = 0.01 * srate ; @ block synth_block (); synth_block_each ( synth1 ) && synth_block_each ( synth2 ) && synth_block_each ( synth3 ) && synth_block_each ( synth4 ) && synth_block_each ( synth5 ) && synth_block_each ( synth6 ) && synth_block_each ( synth7 ) && synth_block_each ( synth8 ) && synth_block_each ( synth9 ) && synth_block_each ( synth10 ) && synth_block_each ( synth11 ) && synth_block_each ( synth12 ) && synth_block_each ( synth13 ) && synth_block_each ( synth14 ) && synth_block_each ( synth15 ) && synth_block_each ( synth16 ); @ sample function process_note ( note *) ( synth_sample_each ( note ) ? ( synth_release ( note ) >= 0 ? ( synth_stop ( note ); ); ); synth_continue ( note ); ); process_note ( synth1 ) && process_note ( synth2 ) && process_note ( synth3 ) && process_note ( synth4 ) && process_note ( synth5 ) && process_note ( synth6 ) && process_note ( synth7 ) && process_note ( synth8 ) && process_note ( synth9 ) && process_note ( synth10 ) && process_note ( synth11 ) && process_note ( synth12 ) && process_note ( synth13 ) && process_note ( synth14 ) && process_note ( synth15 ) && process_note ( synth16 ); @ gfx 1168 170 n = 7 ; PIANO_ROLL_SCREEN = 1 ; PIANO_ROLL_PERIOD = 1 ; ui_reserve_image ( PIANO_ROLL_SCREEN ); function set_colour ( note *) ( ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 ); ); function draw_note ( note *) ( synth_on ( note ) ? ( set_colour ( note ); piano_fill_key ( synth_midinote ( note ), 24 , ( n * 12 - 1 )+ 24 ); ); synth_continue ( note ); ); function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) ( synth_on ( note ) ? ( set_colour ( note ); left = g_w *( synth_midinote ( note )- 24 )/( n * 12 ) + 0.5 ; gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels ); ); synth_continue ( note ); ); ui_start ( "main" ); ui_screen () === "main" ? ( ui_split_bottom ( ui_width ()* 0.15 ); piano_draw ( 0 , ( n * 12 - 1 )); draw_note ( synth1 ) && draw_note ( synth2 ) && draw_note ( synth3 ) && draw_note ( synth4 ) && draw_note ( synth5 ) && draw_note ( synth6 ) && draw_note ( synth7 ) && draw_note ( synth8 ) && draw_note ( synth9 ) && draw_note ( synth10 ) && draw_note ( synth11 ) && draw_note ( synth12 ) && draw_note ( synth13 ) && draw_note ( synth14 ) && draw_note ( synth15 ) && draw_note ( synth16 ); ui_pop (); gfx_dest = PIANO_ROLL_SCREEN ; gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h ); g_w != ui_width () || g_h != ui_height () ? ( gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ()); gfx_r = gfx_g = gfx_b = 0 ; gfx_a = 1 ; gfx_rect ( 0 , 0 , g_w , g_h ); ); g_t = time_precise (); g_dt = g_t - g_t_old ; g_t_old = g_t ; pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 7 ); gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels ); gfx_r = gfx_g = gfx_b = 0 ; gfx_rect ( 0 , g_h - pixels , g_w , pixels ); draw_roll_note ( synth1 , g_w , g_h , pixels ) && draw_roll_note ( synth2 , g_w , g_h , pixels ) && draw_roll_note ( synth3 , g_w , g_h , pixels ) && draw_roll_note ( synth4 , g_w , g_h , pixels ) && draw_roll_note ( synth5 , g_w , g_h , pixels ) && draw_roll_note ( synth6 , g_w , g_h , pixels ) && draw_roll_note ( synth7 , g_w , g_h , pixels ) && draw_roll_note ( synth8 , g_w , g_h , pixels ) && draw_roll_note ( synth9 , g_w , g_h , pixels ) && draw_roll_note ( synth10 , g_w , g_h , pixels ) && draw_roll_note ( synth11 , g_w , g_h , pixels ) && draw_roll_note ( synth12 , g_w , g_h , pixels ) && draw_roll_note ( synth13 , g_w , g_h , pixels ) && draw_roll_note ( synth14 , g_w , g_h , pixels ) && draw_roll_note ( synth15 , g_w , g_h , pixels ) && draw_roll_note ( synth16 , g_w , g_h , pixels ); gfx_dest = - 1 ; gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ()); control_finish_technical (); ui_color ( 255 , 255 , 255 , 0.3 ); ui_border (); );
Last edited by TonE; 03-27-2020 at 03:35 PM .
03-27-2020, 05:03 PM
#234
Human being with feelings
Join Date: Nov 2018
Posts: 61
Yeah, there it is! thanks so much!
For anyone else reading, here's "Piano Display Small"
PHP Code:
desc : Piano Display ( by Geraint Luff )
in_pin : none
out_pin : none
import ui - lib . jsfx - inc
import piano - ui . jsfx - inc
import synth - framework - obj . jsfx - inc
@ init
freemem = 0 ;
freemem = ui_setup ( freemem );
freemem = synth_setup ( freemem );
synth_setup_each ( synth1 );
synth_setup_each ( synth2 );
synth_setup_each ( synth3 );
synth_setup_each ( synth4 );
synth_setup_each ( synth5 );
synth_setup_each ( synth6 );
synth_setup_each ( synth7 );
synth_setup_each ( synth8 );
synth_setup_each ( synth9 );
synth_setup_each ( synth10 );
synth_setup_each ( synth11 );
synth_setup_each ( synth12 );
synth_setup_each ( synth13 );
synth_setup_each ( synth14 );
synth_setup_each ( synth15 );
synth_setup_each ( synth16 );
attack_samples = 0.01 * srate ;
release_samples = 0.01 * srate ;
@ block
synth_block ();
synth_block_each ( synth1 )
&& synth_block_each ( synth2 )
&& synth_block_each ( synth3 )
&& synth_block_each ( synth4 )
&& synth_block_each ( synth5 )
&& synth_block_each ( synth6 )
&& synth_block_each ( synth7 )
&& synth_block_each ( synth8 )
&& synth_block_each ( synth9 )
&& synth_block_each ( synth10 )
&& synth_block_each ( synth11 )
&& synth_block_each ( synth12 )
&& synth_block_each ( synth13 )
&& synth_block_each ( synth14 )
&& synth_block_each ( synth15 )
&& synth_block_each ( synth16 );
@ sample
function process_note ( note *) (
synth_sample_each ( note ) ? (
synth_release ( note ) >= 0 ? (
synth_stop ( note );
);
);
synth_continue ( note );
);
process_note ( synth1 )
&& process_note ( synth2 )
&& process_note ( synth3 )
&& process_note ( synth4 )
&& process_note ( synth5 )
&& process_note ( synth6 )
&& process_note ( synth7 )
&& process_note ( synth8 )
&& process_note ( synth9 )
&& process_note ( synth10 )
&& process_note ( synth11 )
&& process_note ( synth12 )
&& process_note ( synth13 )
&& process_note ( synth14 )
&& process_note ( synth15 )
&& process_note ( synth16 );
@ gfx 1168 170
n = 4 ;
PIANO_ROLL_SCREEN = 1 ;
PIANO_ROLL_PERIOD = 1 ;
ui_reserve_image ( PIANO_ROLL_SCREEN );
function set_colour ( note *) (
ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 );
);
function draw_note ( note *) (
synth_on ( note ) ? (
set_colour ( note );
piano_fill_key ( synth_midinote ( note ), 36 , ( n * 12 - 1 )+ 36 );
);
synth_continue ( note );
);
function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) (
synth_on ( note ) ? (
set_colour ( note );
left = g_w *( synth_midinote ( note )- 36 )/( n * 12 ) + 0.5 ;
gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels );
);
synth_continue ( note );
);
ui_start ( "main" );
ui_screen () === "main" ? (
ui_split_bottom ( ui_width ()* 0.15 );
piano_draw ( 0 , ( n * 12 - 1 ));
draw_note ( synth1 )
&& draw_note ( synth2 )
&& draw_note ( synth3 )
&& draw_note ( synth4 )
&& draw_note ( synth5 )
&& draw_note ( synth6 )
&& draw_note ( synth7 )
&& draw_note ( synth8 )
&& draw_note ( synth9 )
&& draw_note ( synth10 )
&& draw_note ( synth11 )
&& draw_note ( synth12 )
&& draw_note ( synth13 )
&& draw_note ( synth14 )
&& draw_note ( synth15 )
&& draw_note ( synth16 );
ui_pop ();
gfx_dest = PIANO_ROLL_SCREEN ;
gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h );
g_w != ui_width () || g_h != ui_height () ? (
gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ());
gfx_r = gfx_g = gfx_b = 0 ;
gfx_a = 1 ;
gfx_rect ( 0 , 0 , g_w , g_h );
);
g_t = time_precise ();
g_dt = g_t - g_t_old ;
g_t_old = g_t ;
pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 7 );
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels );
gfx_r = gfx_g = gfx_b = 0 ;
gfx_rect ( 0 , g_h - pixels , g_w , pixels );
draw_roll_note ( synth1 , g_w , g_h , pixels )
&& draw_roll_note ( synth2 , g_w , g_h , pixels )
&& draw_roll_note ( synth3 , g_w , g_h , pixels )
&& draw_roll_note ( synth4 , g_w , g_h , pixels )
&& draw_roll_note ( synth5 , g_w , g_h , pixels )
&& draw_roll_note ( synth6 , g_w , g_h , pixels )
&& draw_roll_note ( synth7 , g_w , g_h , pixels )
&& draw_roll_note ( synth8 , g_w , g_h , pixels )
&& draw_roll_note ( synth9 , g_w , g_h , pixels )
&& draw_roll_note ( synth10 , g_w , g_h , pixels )
&& draw_roll_note ( synth11 , g_w , g_h , pixels )
&& draw_roll_note ( synth12 , g_w , g_h , pixels )
&& draw_roll_note ( synth13 , g_w , g_h , pixels )
&& draw_roll_note ( synth14 , g_w , g_h , pixels )
&& draw_roll_note ( synth15 , g_w , g_h , pixels )
&& draw_roll_note ( synth16 , g_w , g_h , pixels );
gfx_dest = - 1 ;
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ());
control_finish_technical ();
ui_color ( 255 , 255 , 255 , 0.3 );
ui_border ();
);
"Piano Display Medium"
PHP Code:
desc : Piano Display ( by Geraint Luff )
in_pin : none
out_pin : none
import ui - lib . jsfx - inc
import piano - ui . jsfx - inc
import synth - framework - obj . jsfx - inc
@ init
freemem = 0 ;
freemem = ui_setup ( freemem );
freemem = synth_setup ( freemem );
synth_setup_each ( synth1 );
synth_setup_each ( synth2 );
synth_setup_each ( synth3 );
synth_setup_each ( synth4 );
synth_setup_each ( synth5 );
synth_setup_each ( synth6 );
synth_setup_each ( synth7 );
synth_setup_each ( synth8 );
synth_setup_each ( synth9 );
synth_setup_each ( synth10 );
synth_setup_each ( synth11 );
synth_setup_each ( synth12 );
synth_setup_each ( synth13 );
synth_setup_each ( synth14 );
synth_setup_each ( synth15 );
synth_setup_each ( synth16 );
attack_samples = 0.01 * srate ;
release_samples = 0.01 * srate ;
@ block
synth_block ();
synth_block_each ( synth1 )
&& synth_block_each ( synth2 )
&& synth_block_each ( synth3 )
&& synth_block_each ( synth4 )
&& synth_block_each ( synth5 )
&& synth_block_each ( synth6 )
&& synth_block_each ( synth7 )
&& synth_block_each ( synth8 )
&& synth_block_each ( synth9 )
&& synth_block_each ( synth10 )
&& synth_block_each ( synth11 )
&& synth_block_each ( synth12 )
&& synth_block_each ( synth13 )
&& synth_block_each ( synth14 )
&& synth_block_each ( synth15 )
&& synth_block_each ( synth16 );
@ sample
function process_note ( note *) (
synth_sample_each ( note ) ? (
synth_release ( note ) >= 0 ? (
synth_stop ( note );
);
);
synth_continue ( note );
);
process_note ( synth1 )
&& process_note ( synth2 )
&& process_note ( synth3 )
&& process_note ( synth4 )
&& process_note ( synth5 )
&& process_note ( synth6 )
&& process_note ( synth7 )
&& process_note ( synth8 )
&& process_note ( synth9 )
&& process_note ( synth10 )
&& process_note ( synth11 )
&& process_note ( synth12 )
&& process_note ( synth13 )
&& process_note ( synth14 )
&& process_note ( synth15 )
&& process_note ( synth16 );
@ gfx 1168 170
n = 6 ;
PIANO_ROLL_SCREEN = 1 ;
PIANO_ROLL_PERIOD = 1 ;
ui_reserve_image ( PIANO_ROLL_SCREEN );
function set_colour ( note *) (
ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 );
);
function draw_note ( note *) (
synth_on ( note ) ? (
set_colour ( note );
piano_fill_key ( synth_midinote ( note ), 24 , ( n * 12 - 1 )+ 24 );
);
synth_continue ( note );
);
function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) (
synth_on ( note ) ? (
set_colour ( note );
left = g_w *( synth_midinote ( note )- 24 )/( n * 12 ) + 0.5 ;
gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels );
);
synth_continue ( note );
);
ui_start ( "main" );
ui_screen () === "main" ? (
ui_split_bottom ( ui_width ()* 0.15 );
piano_draw ( 0 , ( n * 12 - 1 ));
draw_note ( synth1 )
&& draw_note ( synth2 )
&& draw_note ( synth3 )
&& draw_note ( synth4 )
&& draw_note ( synth5 )
&& draw_note ( synth6 )
&& draw_note ( synth7 )
&& draw_note ( synth8 )
&& draw_note ( synth9 )
&& draw_note ( synth10 )
&& draw_note ( synth11 )
&& draw_note ( synth12 )
&& draw_note ( synth13 )
&& draw_note ( synth14 )
&& draw_note ( synth15 )
&& draw_note ( synth16 );
ui_pop ();
gfx_dest = PIANO_ROLL_SCREEN ;
gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h );
g_w != ui_width () || g_h != ui_height () ? (
gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ());
gfx_r = gfx_g = gfx_b = 0 ;
gfx_a = 1 ;
gfx_rect ( 0 , 0 , g_w , g_h );
);
g_t = time_precise ();
g_dt = g_t - g_t_old ;
g_t_old = g_t ;
pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 7 );
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels );
gfx_r = gfx_g = gfx_b = 0 ;
gfx_rect ( 0 , g_h - pixels , g_w , pixels );
draw_roll_note ( synth1 , g_w , g_h , pixels )
&& draw_roll_note ( synth2 , g_w , g_h , pixels )
&& draw_roll_note ( synth3 , g_w , g_h , pixels )
&& draw_roll_note ( synth4 , g_w , g_h , pixels )
&& draw_roll_note ( synth5 , g_w , g_h , pixels )
&& draw_roll_note ( synth6 , g_w , g_h , pixels )
&& draw_roll_note ( synth7 , g_w , g_h , pixels )
&& draw_roll_note ( synth8 , g_w , g_h , pixels )
&& draw_roll_note ( synth9 , g_w , g_h , pixels )
&& draw_roll_note ( synth10 , g_w , g_h , pixels )
&& draw_roll_note ( synth11 , g_w , g_h , pixels )
&& draw_roll_note ( synth12 , g_w , g_h , pixels )
&& draw_roll_note ( synth13 , g_w , g_h , pixels )
&& draw_roll_note ( synth14 , g_w , g_h , pixels )
&& draw_roll_note ( synth15 , g_w , g_h , pixels )
&& draw_roll_note ( synth16 , g_w , g_h , pixels );
gfx_dest = - 1 ;
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ());
control_finish_technical ();
ui_color ( 255 , 255 , 255 , 0.3 );
ui_border ();
);
04-19-2020, 03:30 PM
#235
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Dear Geraint,
how can we access the information like
- first_note_of_phrase,
- previous_note,
- distance,
- nearest_distance
from the main jsfx? Is it possible at all? synth_block() has those local variables, but how can we access them from the main jsfx, in the variable list on the right, they are not available. They seem to be hidden somewhere in memory, I guess.
Mainly I am interested in previous_note and distance, based on those values I would like to change the note colors. Thanks in advance.
I did already some absolute version with note coloring, using Newton coloring palette. But having a relative note coloring based on note intervals, in relation to previous note, would be also cool. Something like in MusicGraph.
Here is the Newton colormap version, in case someone is interested.
PHP Code:
desc : Piano Display 3 ( by Geraint Luff ), 5 octaves , note and interval colors ( by TonE )
in_pin : none
out_pin : none
import ui - lib . jsfx - inc
import piano - ui . jsfx - inc
import synth - framework - obj . jsfx - inc
@ init
freemem = 0 ;
freemem = ui_setup ( freemem );
freemem = synth_setup ( freemem );
synth_setup_each ( synth1 );
synth_setup_each ( synth2 );
synth_setup_each ( synth3 );
synth_setup_each ( synth4 );
synth_setup_each ( synth5 );
synth_setup_each ( synth6 );
synth_setup_each ( synth7 );
synth_setup_each ( synth8 );
synth_setup_each ( synth9 );
synth_setup_each ( synth10 );
synth_setup_each ( synth11 );
synth_setup_each ( synth12 );
synth_setup_each ( synth13 );
synth_setup_each ( synth14 );
synth_setup_each ( synth15 );
synth_setup_each ( synth16 );
attack_samples = 0.01 * srate ;
release_samples = 0.01 * srate ;
@ block
synth_block ();
synth_block_each ( synth1 )
&& synth_block_each ( synth2 )
&& synth_block_each ( synth3 )
&& synth_block_each ( synth4 )
&& synth_block_each ( synth5 )
&& synth_block_each ( synth6 )
&& synth_block_each ( synth7 )
&& synth_block_each ( synth8 )
&& synth_block_each ( synth9 )
&& synth_block_each ( synth10 )
&& synth_block_each ( synth11 )
&& synth_block_each ( synth12 )
&& synth_block_each ( synth13 )
&& synth_block_each ( synth14 )
&& synth_block_each ( synth15 )
&& synth_block_each ( synth16 );
@ sample
function process_note ( note *) (
synth_sample_each ( note ) ? (
synth_release ( note ) >= 0 ? (
synth_stop ( note );
);
);
synth_continue ( note );
);
process_note ( synth1 )
&& process_note ( synth2 )
&& process_note ( synth3 )
&& process_note ( synth4 )
&& process_note ( synth5 )
&& process_note ( synth6 )
&& process_note ( synth7 )
&& process_note ( synth8 )
&& process_note ( synth9 )
&& process_note ( synth10 )
&& process_note ( synth11 )
&& process_note ( synth12 )
&& process_note ( synth13 )
&& process_note ( synth14 )
&& process_note ( synth15 )
&& process_note ( synth16 );
@ gfx 1168 170
n = 5 ;
PIANO_ROLL_SCREEN = 1 ;
PIANO_ROLL_PERIOD = 1 ;
ui_reserve_image ( PIANO_ROLL_SCREEN );
function set_colour ( note *) (
// note coloring by velocity of note
// replace by interval to previous note
ui_color ( 255 * synth_velocity ( note )/ 127 , 255 *( 1 - synth_velocity ( note )/ 127 ), 255 );
);
//setting piano key colors
//function set_colour_interval(note*, noteold*) (
function set_colour_interval ( note *) (
// note coloring by velocity of note
// replace by interval to previous note which is called here noteold
//notepc = note % 12;
//notepc = synth1._synth.NOTE % 12;
//local noteoldpc = noteold % 12;
//local diff = notepc - noteoldpc;
//diff = notepc - 0;
synth1 . _synth . ACTIVE == 1 ? diff = synth1 . _synth . NOTE % 12 :
synth2 . _synth . ACTIVE == 1 ? diff = synth2 . _synth . NOTE % 12 ;
diff == 0 ? ui_color ( 255 , 0 , 0 ) : // c red
diff == 1 ? ui_color ( 250 , 118 , 86 ) : // c# red-orange
diff == 2 ? ui_color ( 255 , 102 , 0 ) : // d orange
diff == 3 ? ui_color ( 245 , 205 , 97 ) : //d# yellow-orange
diff == 4 ? ui_color ( 255 , 255 , 0 ) : // e yellow
diff == 5 ? ui_color ( 0 , 255 , 0 ) : // f green
diff == 6 ? ui_color ( 60 , 251 , 213 ) : // f# blue-green
diff == 7 ? ui_color ( 63 , 95 , 255 ) : // g blue
diff == 8 ? ui_color ( 144 , 133 , 248 ) : // a# blue-indigo
diff == 9 ? ui_color ( 108 , 50 , 255 ) : // a indigo
diff == 10 ? ui_color ( 183 , 115 , 247 ) : // a# indigo-violet
diff == 11 ? ui_color ( 162 , 0 , 216 ) : // b violet
ui_color ( 162 , 0 , 216 ); // rest, violet, should be nothing
// diff == 1 || diff == 11 ? ui_color(250, 118, 86) : // c# red-orange
// diff == 2 || diff == 10 ? ui_color(255, 102, 0) : // d orange
// diff == 3 || diff == 9 ? ui_color(245, 205, 97) : //d# yellow-orange
// diff == 4 || diff == 8 ? ui_color(255, 255, 0) : // e yellow
// diff == 5 || diff == 7 ? ui_color(0, 255, 0) : // f green
// diff == 6 ? ui_color(60, 251, 213) : // f# blue-green
// ui_color(162, 0, 216); // rest, violet, should be nothing
// ui_color(255*synth_velocity(note)/127, 255*(1 - synth_velocity(note)/127), 255);
);
function draw_note ( note *) (
synth_on ( note ) ? (
set_colour_interval ( note );
piano_fill_key ( synth_midinote ( note ), 24 , ( n * 12 - 1 )+ 24 );
);
synth_continue ( note );
);
function draw_roll_note ( note *, g_w , g_h , pixels ) local ( left ) (
synth_on ( note ) ? (
set_colour_interval ( note );
left = g_w *( synth_midinote ( note )- 24 )/( n * 12 ) + 0.5 ;
gfx_rect ( left , g_h - pixels , g_w /( n * 12 ), pixels );
);
synth_continue ( note );
);
ui_start ( "main" );
ui_screen () === "main" ? (
ui_split_bottom ( ui_width ()* 0.15 );
piano_draw ( 0 , ( n * 12 - 1 ));
draw_note ( synth1 )
&& draw_note ( synth2 )
&& draw_note ( synth3 )
&& draw_note ( synth4 )
&& draw_note ( synth5 )
&& draw_note ( synth6 )
&& draw_note ( synth7 )
&& draw_note ( synth8 )
&& draw_note ( synth9 )
&& draw_note ( synth10 )
&& draw_note ( synth11 )
&& draw_note ( synth12 )
&& draw_note ( synth13 )
&& draw_note ( synth14 )
&& draw_note ( synth15 )
&& draw_note ( synth16 );
ui_pop ();
gfx_dest = PIANO_ROLL_SCREEN ;
gfx_getimgdim ( PIANO_ROLL_SCREEN , g_w , g_h );
g_w != ui_width () || g_h != ui_height () ? (
gfx_setimgdim ( PIANO_ROLL_SCREEN , g_w = ui_width (), g_h = ui_height ());
gfx_r = gfx_g = gfx_b = 0 ;
gfx_a = 1 ;
gfx_rect ( 0 , 0 , g_w , g_h );
);
g_t = time_precise ();
g_dt = g_t - g_t_old ;
g_t_old = g_t ;
pixels = ceil ( g_dt / PIANO_ROLL_PERIOD * g_h / 7 );
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , pixels , g_w , g_h - pixels , 0 , 0 , g_w , g_h - pixels );
gfx_r = gfx_g = gfx_b = 0 ;
gfx_rect ( 0 , g_h - pixels , g_w , pixels );
draw_roll_note ( synth1 , g_w , g_h , pixels )
&& draw_roll_note ( synth2 , g_w , g_h , pixels )
&& draw_roll_note ( synth3 , g_w , g_h , pixels )
&& draw_roll_note ( synth4 , g_w , g_h , pixels )
&& draw_roll_note ( synth5 , g_w , g_h , pixels )
&& draw_roll_note ( synth6 , g_w , g_h , pixels )
&& draw_roll_note ( synth7 , g_w , g_h , pixels )
&& draw_roll_note ( synth8 , g_w , g_h , pixels )
&& draw_roll_note ( synth9 , g_w , g_h , pixels )
&& draw_roll_note ( synth10 , g_w , g_h , pixels )
&& draw_roll_note ( synth11 , g_w , g_h , pixels )
&& draw_roll_note ( synth12 , g_w , g_h , pixels )
&& draw_roll_note ( synth13 , g_w , g_h , pixels )
&& draw_roll_note ( synth14 , g_w , g_h , pixels )
&& draw_roll_note ( synth15 , g_w , g_h , pixels )
&& draw_roll_note ( synth16 , g_w , g_h , pixels );
gfx_dest = - 1 ;
gfx_blit ( PIANO_ROLL_SCREEN , 1 , 0 , 0 , 0 , g_w , g_h , ui_left (), ui_top ());
control_finish_technical ();
ui_color ( 255 , 255 , 255 , 0.3 );
ui_border ();
);
Last edited by TonE; 04-19-2020 at 03:56 PM .
04-20-2020, 05:54 PM
#236
Human being with feelings
Join Date: Nov 2018
Posts: 61
That's cool!!
07-19-2020, 04:13 PM
#237
Human being with feelings
Join Date: Jul 2020
Posts: 5
Quote:
Originally Posted by
geraintluff
These are fantastic, thanks so much! I haven't tried everything (piano display was all I really needed) but you've made some real gems here. PadSynth in particular is really cool, in both your approach to the synth and some really great presets to show it off. Thanks again.
07-20-2020, 11:00 AM
#238
Human being with feelings
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
just discover this gem thank you soo muchhh!
09-27-2020, 04:42 PM
#239
Human being with feelings
Join Date: Mar 2010
Posts: 266
Hi all,
Just downloaded these plugins, not sure how to get them to load in Reaper?
09-27-2020, 04:50 PM
#240
Human being with feelings
Join Date: Jan 2009
Location: Curaçao
Posts: 410
Quote:
Originally Posted by
JMTee
Hi all,
Just downloaded these plugins, not sure how to get them to load in Reaper?
Easiest way is with Reapack, after adding Reapack to reaper you just add the path mentioned in the first post of this thread
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -7. The time now is 06:42 AM .