12866
Comment:
|
12942
|
Deletions are marked like this. | Additions are marked like this. |
Line 56: | Line 56: |
self.sr = 44100 | self.sr = int(44100) |
Line 90: | Line 90: |
html("Karplus-Strong algorithm with blending and delay stretching") html("<br>K. Karplus and A. Strong, <em>Digital synthesis of plucked string and drum timbres</em>, \nComputer Music Journal 7 (2) (1983), 43–55.<br>") html("Initial waveform:") |
pretty_print(html("Karplus-Strong algorithm with blending and delay stretching")) pretty_print(html("<br>K. Karplus and A. Strong, <em>Digital synthesis of plucked string and drum timbres</em>, \nComputer Music Journal 7 (2) (1983), 43–55.<br>")) pretty_print(html("Initial waveform:")) |
Line 94: | Line 94: |
html("Waveform after stabilization:") | pretty_print(html("Waveform after stabilization:")) |
Line 96: | Line 96: |
s2str = ''.join(wave.struct.pack('h',x) for x in s2f) | s2str = b''.join(wave.struct.pack('f',x) for x in s2f) |
Line 100: | Line 100: |
html('<embed src="cell://test'+ lab +'.wav" width="200" height="100"></embed>') | pretty_print(html('<embed src="cell://test'+ lab +'.wav" width="200" height="100"></embed>')) |
Sage Interactions - Miscellaneous
goto interact main page
Contents
Hearing a trigonometric identity
by Marshall Hampton. When the two frequencies are well separated, we hear the right hand side of the identity. When they start getting close, we hear the higher-pitched factor in the left-hand side modulated by the lower-pitched envelope.
Karplus-Strong algorithm for plucked and percussive sound generation
by Marshall Hampton
An Interactive Venn Diagram
Unreadable code
by Igor Tolkov
Profile a snippet of code
Evaluate a bit of code in a given system
by William Stein (there is no way yet to make the text box big):
Minkowski Sum
by Marshall Hampton
Cellular Automata
by Pablo Angulo, Eviatar Bach
Another Interactive Venn Diagram
by Jane Long (adapted from http://wiki.sagemath.org/interact/misc)
This interact models a problem in which a certain number of people are surveyed to see if they participate in three different activities (running, biking, and swimming). Users can indicate the numbers of people in each category, from 0 to 100. Returns a graphic of a labeled Venn diagram with the number of people in each region. Returns an explanatory error message if user input is inconsistent.