1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

knobman

Discussion in 'Scripting Workshop' started by Worra, Mar 14, 2013.

  1. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Aaron,

    I'm PC only here so we may have some differences due to that.
    But, specifically what happened here, as best as I can reconstruct it is this:

    I first loaded your script text file in Nils' Editor (the KSE). When I tried to compile it, the KSE complained about not knowing the text string "Multiknob2" (which in itself was strange). After some fooling around and retyping the offensive line, it then compiled OK and I could load it into Kontakt 5.

    I then copied' your PNG file and its companion text file to the proper pictures folder and tried to run your script in K5. I was greeted with essentially the same kind of vertical strip display that you originally complained about.

    Then, I double-clicked the pix text file to examine it and noticed that the Number of Animations were zero. The text file I examined was merely a copy of your original text file that I unzipped from your attachment. Anyway, I changed the zero to 20 and resaved it. Then I went back into K5 and re-ran and it now displays properly.

    However, if you like, I can remake your two text files (the script and the PNG companion) and attach them to a post here so you can see if they will work on your end also. Let me know if you would like me to do that.

    Rejoice,

    Bob
     
  2. Aaron Dirk

    Aaron Dirk Forum Member

    Messages:
    43
    Thank you Bob, for taking the time to look into this.

    Yes, please post the corrected files and I will give them a try.
     
  3. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Aaron,

    I'm attaching a small zip containing the re-worked text files for the script and the pix. I didn't do anything to the png to correct the problem here so I'm not including it.

    I notice also that your text files do not contain any line breaks when I load them in a simple Windows text editor like notepad. To re-work these files, here is what I did.

    I first loaded your text files (one by one) into notepad. Then I used copy and paste of the clipboard into Nils' KS Editor (the KSE). That nicely added the needed line breaks. I merely resaved the PNG text file but the script text file had to be further edited. In the KSE, I replaced the picture text string with the correct text "MultiKnob2" instead of the italics format that you have there.

    Try taking the attached MultiKnob2.txt file and put it alongside your png file (in the pictures folder or resources folder or where-ever you have your png now). Be sure to change the name of your current MultiKnob2.txt file so it won't be found by accident. Then, load my script text file directly into K5 and inspect the source code in K5's editor. The picture string should show as "MultiKnob2" and not some italicized string. When I loaded your original script text into K5, it flagged the picture code and replaced your italicized quotes with question marks.

    Once you have my corrected script in K5 and hit apply, it should run properly. Please let me know if it doesn't.

    Maybe you should get a better text editor?

    Rejoice,

    Bob
     

    Attached Files:

  4. Aaron Dirk

    Aaron Dirk Forum Member

    Messages:
    43
    Thanks Bob,
    just replacing the text file alone worked.

    I was using Text Edit, which comes installed on OSX (like notepad on PC)
    I went out and got Text Wrangler, changed the alpha in your .txt from no to yes, and it worked!
    I then proceed to make a new one for a png I made, and it worked!

    Problem solved! Text Edit on OSX is garbage


    Thanks a ton Bob!!!!!
     
  5. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Glad you nailed it Aaron. It seems to me I recall Mario saying that Kontakt needs to see a CRLF at the end of the text file and certain Mac software doesn't seem to do that. I guess maybe your situation was a classic example of that :) You might want to get Nils' plugin for the KSE that runs with Sublime Text 3. I understand that this combo works very well for Mac users.

    BTW I didn't notice the alpha thing, evidently that setting also got changed when K5 changed the 20 to zero (because I notice that your original unzipped file has the alpha channel enabled but my edited one has it disabled). Weird!
     
  6. Aaron Dirk

    Aaron Dirk Forum Member

    Messages:
    43
    Yes, I already switched to Sublime Text3 with Nil's plugin.
    Nil's Script Editor for Mac, after I upgraded to the latest version just didn't work, and I couldn't revert back
    I guess someone else ported it to mac for him.
    Sublime Text3 with Nil's plugin works great!

    It's funny, I was pc/mac for the longest time. But both my pc's were constantly nickel and dime'ing me (newegg loved me! they sent me a really nice free newegg hat!)
    I decided to drop pc's out right, in favor of the headache free macs (before newegg sends me a free leather newegg racing jacket)
    go figure....

    The alpha channel is head scratcher. I suppose the frame number changing to 0 is possible in a corrupt file... but to change a yes to a no?
    I assume Kontakt just merely reads them. Do you suppose if Kontakt can't quite read them, it makes it up and rewrites them?


    At any rate, I'm back in business :)
    Thanks again Bob!
     
  7. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    You should save the .txt file as ANSI, not Unicode, and don't forget that it needs to have an empty line at the end (this is important). Also, line endings have to be LF, not CR. This is why the Developer guide says that these .txt files are best created on Windows, in Notepad.
     
  8. Cal545

    Cal545 New Member

    Messages:
    19
    Just wondering if I can get some knobman help

    I'm placing my own buttons to the Kontakt inbuilt arpeggiator with numerical text value

    All's working well apart from the rate button, I've added this (1/28, 1/64, 1/32, 1/16T, 3/64,1/16, 1/8T, 3/32, 1/8, 1/4T, 3/16, 1/4, 1/2T, 3/8, 1/2, 3/4, 4/4, Bar) to the text section on knobman and its working however the specific rates don't make the same noise as if it were the Kontakt Knob

    My Slider's value is the same as Kontakts...... declare ui_slider $Rate_knob (0, 1000000)

    There is 127 animations and this is the same as the Text Log attached to the PNG animation

    Does any one have any suggestions to make the button numerical value relate to the Kontakt version?

    Thanks
     
  9. corbo-billy

    corbo-billy NI Product Owner

    Messages:
    652
    declare ui_slider $Rate_knob (0, 17)
     
  10. Cal545

    Cal545 New Member

    Messages:
    19
    Hi, thanks

    I tried that however the arpeggiator sounded like it was going of constantly and no matter what I did with the rate knob nothing changed sound.
    Is there something I've missed?

    Thanks
     
  11. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    In the factory script, you want to use $Sync_knob, not $Rate_knob.

    To do that, you change these two lines:

    Code:
        move_control($Rate_knob,1,8)
        move_control($Sync_knob,0,0)
    
    to:

    Code:
        move_control($Rate_knob,0,0)
        move_control($Sync_knob,1,8)
    
     
  12. Cal545

    Cal545 New Member

    Messages:
    19
    Cool, ill swop the sliders over as soon as possible and try this method.
    Thanks very much to all.
    :)
     
  13. Cal545

    Cal545 New Member

    Messages:
    19
    Hi,

    So I implemented the above and it worked however the rate button still isn't working properly

    So for example my sliders with 4/4 timing on the rate button doesn't match Kontakts 4/4 when u listen to it, its like its a different pattern

    I have declared the slider as ui_slider $Sync_knob (0,17)

    I've done 17 render frames in Knob man and it has this on the text file as well

    really unsure where im going wrong ?

    thanks
     
  14. Cal545

    Cal545 New Member

    Messages:
    19
    Managed to work it out it was the swing slider I'd referenced the numbers incorrectly after delcare seems to be fine now. A light sunday afternoon win lol