Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
Javascript - trying to add a property in a loop

I'm trying to write a midi file by adding notes using a loop. This works fine when adding the first note from an array of notes:

 trk1.smfSeqName('Music')
            .ch(0) // all subsequent messahes will go to channel 0
            .program(0x1) // set channel 0 program to piano
           // .tick(100).note('E5', 127, 75) // clock: 100, MIDI channel: 0, note: E5, velocity: 127, duration: 50 clocks
           .tick(50).note(noteArray.at(0), 127, 100)   // can also use numerical values for the notes

but when I try and add multiple notes in for loop I get an error

for (i = 0; i < noteArray.length; i++) {
            .tick(50).note(noteArray.at(i), 127, 100)   // can also use numerical values for the notes
        }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!