Changeset 41

Show
Ignore:
Timestamp:
05/12/07 17:59:34 (2 years ago)
Author:
gordonjcp
Message:

now some of the ensemble controls work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nekostring/trunk/gui/interface.c

    r39 r41  
    202202  gtk_widget_set_size_request (vbox9, 50, 135); 
    203203 
    204   vs_vspeed = gtk_vscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (-0.105882, -1, 1, 0, 0, 0))); 
     204  vs_vspeed = gtk_vscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0.5, 0, 1, 0, 0, 0))); 
    205205  gtk_widget_show (vs_vspeed); 
    206206  gtk_box_pack_start (GTK_BOX (vbox9), vs_vspeed, TRUE, FALSE, 0); 
     
    219219  gtk_widget_set_size_request (vbox10, 50, 135); 
    220220 
    221   vs_vdepth = gtk_vscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0.541176, 0, 1, 0, 0, 0))); 
     221  vs_vdepth = gtk_vscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0.6541176, 0, 1, 0, 0, 0))); 
    222222  gtk_widget_show (vs_vdepth); 
    223223  gtk_box_pack_start (GTK_BOX (vbox10), vs_vdepth, TRUE, FALSE, 0); 
    224224  gtk_widget_set_size_request (vs_vdepth, 50, 120); 
    225225  gtk_scale_set_draw_value (GTK_SCALE (vs_vdepth), FALSE); 
    226   gtk_scale_set_digits (GTK_SCALE (vs_vdepth), 2); 
    227   gtk_range_set_update_policy (GTK_RANGE (vs_vdepth), GTK_UPDATE_DISCONTINUOUS); 
     226//  gtk_scale_set_digits (GTK_SCALE (vs_vdepth), 2); 
     227//  gtk_range_set_update_policy (GTK_RANGE (vs_vdepth), GTK_UPDATE_DISCONTINUOUS); 
    228228  gtk_range_set_inverted (GTK_RANGE (vs_vdepth), TRUE); 
    229229 
     
    502502                        "value_changed", GTK_SIGNAL_FUNC(on_voice_slider_change), 
    503503                        (gpointer)NEKO_PORT_VIOLIN_LEVEL); 
     504        gtk_signal_connect (GTK_OBJECT (vs_cspeed), 
     505                        "value_changed", GTK_SIGNAL_FUNC(on_voice_slider_change), 
     506                        (gpointer)NEKO_PORT_SPEED); 
     507    gtk_signal_connect (GTK_OBJECT (vs_cdepth), 
     508                        "value_changed", GTK_SIGNAL_FUNC(on_voice_slider_change), 
     509                        (gpointer)NEKO_PORT_DEPTH); 
     510        gtk_signal_connect (GTK_OBJECT (vs_vspeed), 
     511                        "value_changed", GTK_SIGNAL_FUNC(on_voice_slider_change), 
     512                        (gpointer)NEKO_PORT_VIBRATO_CHORUS); 
     513        gtk_signal_connect (GTK_OBJECT (vs_vdepth), 
     514                        "value_changed", GTK_SIGNAL_FUNC(on_voice_slider_change), 
     515                        (gpointer)NEKO_PORT_MIX); 
     516 
    504517 
    505518  return window1; 
  • nekostring/trunk/src/neko_ensemble.c

    r35 r41  
    2929//  float yomega = 6.2831852f * (5.75 / (float)sample_rate); 
    3030 
    31   float xomega = 1024.0f * (0.5 / (float)sample_rate); 
    32   float yomega = 1024.0f * (5.75 / (float)sample_rate); 
     31  float xomega = 1024.0f * (*(synth->speed)*0.5 / (float)sample_rate); 
     32  float yomega = 1024.0f * (*(synth->speed)*5.75 / (float)sample_rate); 
    3333 
    3434  float dr =  0.5* 0.002 * (float)sample_rate * 0.5f;   // FIXME - identify this bit 
     
    3838 
    3939  float depth1=3; 
    40   float depth2=1.85; 
    41   float mix=0.75
     40  float depth2=*(synth->depth)*2.5; 
     41  float mix=0.5+0.5* *(synth->mix)
    4242  float s1, s2;                 // samples from the buffer 
    4343 
  • nekostring/trunk/src/neko_voice_render.c

    r39 r41  
    316316 
    317317        kf = omega1/(float)(synth->sample_rate); 
    318          
     318 
    319319        //printf("%f %f\n",omega1, kf); 
    320320         
     
    322322        vco(sample_count, voice, &voice->osc_cello, osc_index, 0.001, 0.4-(kf/2), *(synth->cello), deltat * omega1/2); 
    323323        // generate viola 
    324         vco(sample_count, voice, &voice->osc_viola, osc_index, 0.02, 0.25+kf, *(synth->viola), deltat * omega1); 
     324        vco(sample_count, voice, &voice->osc_viola, osc_index, 0.02, 0.55+kf, *(synth->viola), deltat * omega1); 
    325325        // generate violin 
    326         vco(sample_count, voice, &voice->osc_violin, osc_index, 0.03, 0.85+kf, *(synth->violin), deltat * omega1*2); 
     326        vco(sample_count, voice, &voice->osc_violin, osc_index, 0.05-kf, 0.95+kf, *(synth->violin), deltat * omega1*2); 
    327327 
    328328        // apply the VCA, copying the buffer as we go