Mercurial > hg > silvet
comparison src/EM.cpp @ 49:9b17bbd16a5f
Use supplied pitch ranges, plus subrepo update
author | Chris Cannam |
---|---|
date | Mon, 07 Apr 2014 16:21:57 +0100 |
parents | c0c4a945577a |
children | ce1d88759557 9e2d1f6cd43a |
comparison
equal
deleted
inserted
replaced
46:d7f1c10f4e1d | 49:9b17bbd16a5f |
---|---|
35 m_bins(SILVET_TEMPLATE_HEIGHT), | 35 m_bins(SILVET_TEMPLATE_HEIGHT), |
36 m_instruments(SILVET_TEMPLATE_COUNT), | 36 m_instruments(SILVET_TEMPLATE_COUNT), |
37 m_pitchSparsity(1.1), | 37 m_pitchSparsity(1.1), |
38 m_sourceSparsity(1.3) | 38 m_sourceSparsity(1.3) |
39 { | 39 { |
40 m_lowest = 0; | 40 m_lowest = silvet_templates_lowest_note; |
41 m_highest = m_notes - 1; | 41 m_highest = silvet_templates_highest_note; |
42 | |
43 for (int i = 0; i < m_instruments; ++i) { | |
44 if (i == 0 || silvet_templates[i].lowest < m_lowest) { | |
45 m_lowest = silvet_templates[i].lowest; | |
46 } | |
47 if (i == 0 || silvet_templates[i].highest > m_highest) { | |
48 m_highest = silvet_templates[i].highest; | |
49 } | |
50 } | |
51 | 42 |
52 m_pitches = V(m_notes); | 43 m_pitches = V(m_notes); |
53 | 44 |
54 for (int n = 0; n < m_notes; ++n) { | 45 for (int n = 0; n < m_notes; ++n) { |
55 m_pitches[n] = drand48(); | 46 m_pitches[n] = drand48(); |