User:Amy Suo Wu/assignment: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
cat << end
cat << end


@head {
@head {
     $tempo 120   
     $tempo 120   
     $time_sig 4/4
     $time_sig 4/4


}
}
@body {
@body {
   
   
     @channel 1 {
     @channel 1 {

Revision as of 18:27, 12 October 2010

cat << end

@head {
   $tempo 120   
   $time_sig 4/4

}

@body {

   @channel 1 {
       \$patch 17
       \$length 25        
       \$octave 3
       \$pan 0

end

for ((i=0; i<13; i++)) do echo c c c r c c r c r c c r echo c c c r c c r c r c c r echo c c c r c c r c r c c r echo c c c r c c r c r c c r done


cat << end

   }


@channel 2 {
       \$patch 17
       \$length 25
       \$octave 3
       \$pan 127

     


end pat="c c c r c c r c r c c r " pat=$pat$pat$pat$pat

  1. inplace assignment

for ((i=0; i<13; i++)) do echo $pat pat=${pat:2:0}${pat:0:2}

  1. shift the pattern
  2. ${name:offset:length}


done

cat << end

} } end


  1. bash clap.sh | midge -o clap.mid; timidity clap.mid (straight from bash to timidity without going through all the steps)