Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Offline Editor For Project Files (*.NRD)
#51
Hi @mgd I've got perl 5.36.0 installed and when I run it I get:

perl nerdseq.pl NO_NAME_BULKTEST_BULK.PTN
given is experimental at nerdseq.pl line 135.
when is experimental at nerdseq.pl line 136.
when is experimental at nerdseq.pl line 143.
when is experimental at nerdseq.pl line 148.
when is experimental at nerdseq.pl line 158.
when is experimental at nerdseq.pl line 164.
when is experimental at nerdseq.pl line 175.
when is experimental at nerdseq.pl line 180.
given is experimental at nerdseq.pl line 269.
when is experimental at nerdseq.pl line 270.
when is experimental at nerdseq.pl line 295.
when is experimental at nerdseq.pl line 318.
when is experimental at nerdseq.pl line 347.
when is experimental at nerdseq.pl line 373.
when is experimental at nerdseq.pl line 405.
when is experimental at nerdseq.pl line 431.

Same output with or without a file. I know nothing about perl, sorry. Any hints?
Reply
#52
(02-10-2023, 03:54 AM)proxemics Wrote: Hi @mgd I've got perl 5.36.0 installed and when I run it I get:

perl nerdseq.pl NO_NAME_BULKTEST_BULK.PTN
given is experimental at nerdseq.pl line 135.
when is experimental at nerdseq.pl line 136.
when is experimental at nerdseq.pl line 143.
when is experimental at nerdseq.pl line 148.
when is experimental at nerdseq.pl line 158.
when is experimental at nerdseq.pl line 164.
when is experimental at nerdseq.pl line 175.
when is experimental at nerdseq.pl line 180.
given is experimental at nerdseq.pl line 269.
when is experimental at nerdseq.pl line 270.
when is experimental at nerdseq.pl line 295.
when is experimental at nerdseq.pl line 318.
when is experimental at nerdseq.pl line 347.
when is experimental at nerdseq.pl line 373.
when is experimental at nerdseq.pl line 405.
when is experimental at nerdseq.pl line 431.

Same output with or without a file. I know nothing about perl, sorry. Any hints?

These warnings can safely be ignored.

The slightly longer explanation is this:
given / when is Perl's version of switch / case and it is part of Perl at least since 5.10 which is something like 20+ years old. The reason it is flagged as experimental is that Perl has some neat but not so obvious automagical features [I'll not elaborate on this as it goes quite into the details of Perl Wink ] that are not supported by given / when (and probably won't anytime soon).
However basically using them just like switch / case in many other languages and not relying on some implicit Perl specifics is safe.

I'm using them because the resulting code seems better structured and to me is easier to read than using a long list of
if (<some condition>) { }
elsif (<some other condition>) { }
elsif (<another condition>) { }
elsif (<yet another condition>) { }
elsif (<more other condition>) { }
elsif (<some other condition>) { }
else { }

I have left the warnings because it reminds me to be careful what to use and what not.

Kind regards,
Michael

PS: Your above command should be something like
perl nerdseq.pl <NO_NAME_BULKTEST_BULK.PTN >NO_NAME_BULKTEST_BULK.PTN.txt

You'll find very basic usage instructions at the top of the Perl script.
Reply
#53
(12-28-2022, 04:04 PM)XORadmin Wrote:
(12-28-2022, 06:23 AM)mgd Wrote: Here's my guess at CV16 - please correct:

CV16
[1] CV1 bits 0-7
[1] CV1 bits 8-11 and CV2 bits 0-3
[1] CV2 bits 4-11
[1] CV3 bits 0-7
[1] CV3 bits 8-11 and CV4 bits 0-3
[1] CV4 bits 4-11
[1] CV5 bits 0-7
[1] CV5 bits 8-11 and CV6 bits 0-3
[1] CV6 bits 4-11
[3] FX1 (1 byte fx command, 2 bytes payload)  
[3] FX2 (1 byte fx command, 2 bytes payload)  
[3] FX3 (1 byte fx command, 2 bytes payload)  
[1] Patch
[1] Table
[1] Groove

So basically a variant of the Midi layout.

Please correct, especially w/r to the bit numbering Smile

Kind regards,
Michael

You are a smart person :-)

Lets add also the audio part and then we are there (for now):
[1] Note 1
[1] Sample/wave 1
[1] Volume1
[3] FX1.1 (1 byte fx command, 2 bytes payload) 
[3] FX1.2 (1 byte fx command, 2 bytes payload) 
[1] Note 2
[1] Sample/wave 2
[1] Volume 2
[3] FX2.1 (1 byte fx command, 2 bytes payload) 
[3] FX2.2 (1 byte fx command, 2 bytes payload) 
[1] Groove

Some do realize that there is 1 byte left here :-)  What to do with that?

I'm going to mess around with this soon but thanks so much for the work!~
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)