csound


How does Csound's gen09 work?


I'm trying to understand Csound's gen09, and I tried this line:
gigen ftgen 1, 0, 16384, 9, 1, 1, 0, 1, 1, 180
The way I understood how gen09 works, the second partial in this case is supposed to cancel the first, because they are both at the fundamental frequency (1), and the phase is inverted (0 and 180). But instead of silence, I get a wave that looks like this:
What exactly is happening here to create this waveform?
What is happening here is that because rescaling is on (positive GEN number), the
small errors in the calculation are amplified (so the max value is 1). If you constructed the table with -9, you will see that the result is what you expected.
Try this
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
instr 1
a1 oscili 0dbfs,A4,1
out a1
endin
</CsInstruments>
<CsScore>
f1 0 16384 -9 1 1 0 1 1 180
i1 0 1
</CsScore>
</CsoundSynthesizer>
The result should be
SECTION 1:
ftable 1:
new alloc for instr 1:
B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0
Score finished in csoundPerformKsmps().
inactive allocs returned to freespace
end of score. overall amps: 0.0
overall samples out of range: 0

Related Links

How does Csound's gen09 work?
CSOUND Function Table Scaling Error

Categories

HOME
sendgrid
xamarin
testng
omnet++
reflection
view
kalman-filter
rsync
graphql
v8
elasticsearch-hadoop
kentor-authservices
correlation
google-apps-marketplace
static-libraries
opentracing
fatal-error
http-status-code-504
code-review
jprofiler
swiftlint
dcevm
extjs5
rundeck
h2db
smb
opennlp
chromebook
web-api-testing
publish
twilio-api
data-manipulation
caret
textmate
android-nestedscrollview
mapbox-gl
force-layout
mpmediaquery
sequential
picasso
android-ble
automake
android-tabhost
galen
avro4s
fedex
elmah
botbuilder
turbogears
.net-4.6.2
wptoolkit
executenonquery
auto-update
user-accounts
azure-application-gateway
jedis
clean-architecture
hls.js
dropbox-php
diagnostics
boost-preprocessor
pearson
memory-alignment
mcafee
iso8601
eventkit
objective-c-swift-bridge
medium.com
angular-cache
rotativa
database-optimization
etsy
fputcsv
bluemix-app-scan
spidermonkey
tarjans-algorithm
system32
bridge.net
kineticjs
offloading
gulp-less
websocket4net
bitcoinj
eol
uitouch
dml
p4java
algebraic-data-types
tws
sharp-repository
sabredav
typoscript2
venn-diagram
tridion-worldserver
transactionscope
coercion
appender
celltable
actionview
meego
sef
microsoft-virtualization
ugc
misv

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App