Old 12-16-2014, 09:18 AM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default HELPER: memory display function

Here is a JS FX function that you may find useful. It displays the values stored in a segment of memory.

<< removed - better version below >>

Put the function code at the start of your @gfx section. Then call it from anywhere later in the @gfx section and move your mouse over the JS FX.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 09-28-2018 at 09:57 AM.
DarkStar is offline   Reply With Quote
Old 01-23-2015, 05:50 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

And a new version, displaying 2 different memory segments, and the display stops moving upwards when all the desired data is displayed:



Call the function using:
display_memory (segmentA, segmentB, length, format);
// the format can be for example 3.0 or 2.1 or 'A' (for ASCII characters)
// to view the data, move your mouse over the JS FX

[235 downloads]

See post #8 for the latest version
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 03-23-2021 at 05:23 AM.
DarkStar is offline   Reply With Quote
Old 01-23-2015, 09:11 AM   #3
SaulT
Human being with feelings
 
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
Default

Nice, thank you!
SaulT is offline   Reply With Quote
Old 02-19-2015, 11:09 AM   #4
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

And now, an easy way to see some strings (especially past the first 64, and no need to go to the data list on the right-hand side):

// .... example of use
print_strings(100,20); // (first string slot, number of strings)

Attached Files
File Type: txt print_strings_01.txt (975 Bytes, 279 views)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...

Last edited by DarkStar; 02-19-2015 at 11:25 AM.
DarkStar is offline   Reply With Quote
Old 02-19-2015, 02:00 PM   #5
Smashed Transistors
Human being with feelings
 
Smashed Transistors's Avatar
 
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
Default

Thanks a lot DarkStar, these are very helpful.
__________________
JSFX plugins and synths. See you here and there: SoundCloud, Youtube, Google Play...
Smashed Transistors is offline   Reply With Quote
Old 02-20-2015, 07:59 AM   #6
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

... and another trick:

I put the function calls all in the same place in the @gfx section (quite often at the very end):
Code:
zdiagnose == 4 ? print_strings(100,20);   // (first string slot, number of strings)
zdiagnose == 2 ? display_memory(filtered_cname, filtered_param, 64, 3);
zdiagnose == 1 ? display_memory(map_cname, map_param, 64, 3);
zdiagnose == 3 ? display_memory(map_cname, map_mode, 64, 3);
Then when I want to examine some memory areas all I need to do is add, anywhere, for example:
zdiagnose = 3;
and, to turn it off:
zdiagnose = 0;
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 09-27-2018, 02:20 AM   #7
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Ha, I missed this one! Nice work.
IXix is offline   Reply With Quote
Old 03-23-2021, 05:21 AM   #8
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

... and this revision lets you name each memory area:

Code:
display_memory(note_ons, offsets, 64, 3, "Note Ons", "Offsets");
Attached Files
File Type: txt mem_disp_04.txt (3.6 KB, 83 views)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 05-08-2021, 12:45 AM   #9
empi
Human being with feelings
 
Join Date: Apr 2009
Posts: 4
Default

This script is a godsend, but unfortunately this latest version does not work for me out of the box.

Function set_colour is nowhere to be found.

Am I just missing some includes?


Anyway, thanks a lot, really helpful!
empi is offline   Reply With Quote
Old 05-08-2021, 05:44 AM   #10
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Oops,

Where you see lines like
Code:
    set_colour(PALE_YELLOW);
//    gfx_r =0.90; gfx_g =0.80; gfx_b =0.50;
change them to
Code:
//    set_colour(PALE_YELLOW);
    gfx_r =0.90; gfx_g =0.80; gfx_b =0.50;
or whatever colours you want to use
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.