Changeset 1292
- Timestamp:
- 10/29/07 18:00:38 (10 months ago)
- Location:
- trunk/src/buzelib
- Files:
-
- 11 modified
-
PatternEditor/PatternEditorControl.cpp (modified) (2 diffs)
-
Preferences/AudioDriverPreferencesView.cpp (modified) (7 diffs)
-
PresetDialog.cpp (modified) (2 diffs)
-
VisualVolumeSlider.cpp (modified) (3 diffs)
-
VisualVolumeSlider.h (modified) (2 diffs)
-
buze.rc (modified) (1 diff)
-
res/about.txt (modified) (1 diff)
-
res/help.txt (modified) (1 diff)
-
res/keyboard_parameters.txt (modified) (1 diff)
-
res/keyboard_patterneditor.txt (modified) (2 diffs)
-
res/keyboard_wavetable.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/buzelib/PatternEditor/PatternEditorControl.cpp
r1274 r1292 35 35 36 36 // render row numbers 37 for (int i = 0; i <= screenrows && i + editor.scroll.y < editor.rows; i++) { 37 int i; 38 for (i = 0; i <= screenrows && i + editor.scroll.y < editor.rows; i++) { 38 39 int rownum = (i + editor.scroll.y) * editor.skip; 39 40 std::stringstream str; … … 51 52 screenDC.FillSolidRect(0, 0, rcClient.right, y, bgcolor); 52 53 53 for (i nt i= 0; i < editor.tracks.size(); i++) {54 for (i = 0; i < editor.tracks.size(); i++) { 54 55 int track_x = editor.tracks[i].unit * editor.font_size.cx; 55 56 int scroll_x = editor.scroll.x * editor.font_size.cx; -
trunk/src/buzelib/Preferences/AudioDriverPreferencesView.cpp
r1273 r1292 70 70 updateSampleRates(); 71 71 updateChannels(); 72 updateDrivers(); 72 73 return 0; 73 74 } … … 80 81 } 81 82 recordDevice = mainFrame->driver->getDeviceInfo(recordDevices[inputIndex]); 82 return 0;83 return 0; 83 84 } 84 85 … … 101 102 void CAudioDriverPreferencesView::updateLatencies() { 102 103 103 while (int i = audioLatencyDropDown.GetCount()) 104 audioLatencyDropDown.DeleteString(i-1); 104 audioLatencyDropDown.ResetContent(); 105 105 106 106 unsigned int rate = 0; … … 134 134 135 135 void CAudioDriverPreferencesView::updateChannels() { 136 while (int i = audioChannelDropDown.GetCount()) 137 audioChannelDropDown.DeleteString(i-1); 136 audioChannelDropDown.ResetContent(); 138 137 139 138 int channels = device->out_channels / 2; … … 151 150 void CAudioDriverPreferencesView::updateSampleRates() { 152 151 153 while (int i = audioRateDropDown.GetCount()) 154 audioRateDropDown.DeleteString(i-1); 152 audioRateDropDown.ResetContent(); 155 153 156 154 sampleRates.clear(); … … 191 189 192 190 void CAudioDriverPreferencesView::updateDrivers() { 191 192 audioDriverDropDown.ResetContent(); 193 recordDriverDropDown.ResetContent(); 194 193 195 recordDriverDropDown.InsertString(-1, "<none>"); 194 196 195 audiodriver* driver=mainFrame->driver; 196 //int ins = 0, outs = 0; 197 audiodriver* driver = mainFrame->driver; 198 199 int api_id = device?device->api_id:0; 200 197 201 for (int i=0; i<driver->getDeviceCount(); i++) { 198 202 audiodevice* dev = driver->getDeviceInfo(i); … … 201 205 outputDevices.push_back(i); 202 206 } 203 if ( dev->in_channels>0) {207 if (api_id == dev->api_id && dev->in_channels>0) { 204 208 recordDriverDropDown.InsertString(-1, dev->name.c_str()); 205 209 recordDevices.push_back(i); -
trunk/src/buzelib/PresetDialog.cpp
r1280 r1292 49 49 50 50 zzub::pattern conv(plugin, 0); 51 int valueIndex = 0; 51 52 for (size_t i = 0; i < conv.getColumns(); i++) { 52 53 const zzub::parameter* param = conv.getColumnParameter(i); … … 55 56 size_t pgroup=0, ptrack=0, pcolumn=0; 56 57 conv.linearToPattern(i, pgroup, ptrack, pcolumn); 58 if(pgroup == 0) continue; 57 59 58 pi->values[ i] = plugin->getParameter(pgroup, ptrack, pcolumn);60 pi->values[valueIndex] = plugin->getParameter(pgroup, ptrack, pcolumn); 59 61 pi->parameters++; 62 valueIndex++; 60 63 } 61 64 -
trunk/src/buzelib/VisualVolumeSlider.cpp
r1261 r1292 20 20 mainFrame = mainFrm; 21 21 maxL = maxR = 0; 22 rPeak = lPeak = rDrop = lDrop = 0; 23 rPeakColor = lPeakColor = 0; 22 24 counter = 0; 23 25 machine = 0; … … 128 130 strcpy(pc, "L"); 129 131 132 double f; 133 long pos12db; 134 long pos6db; 135 long ivPos; 136 long peakPos; 137 float *curPeak; 138 float *curDrop; 139 COLORREF *curPeakColor; 130 140 float iV=0; 131 if (pc[0]=='L') 132 iV=(linear_to_dB(maxL)+30) / 30; else 141 if (pc[0]=='L') { 142 iV=(linear_to_dB(maxL)+30) / 30; 143 curPeak = &lPeak; 144 curPeakColor = &lPeakColor; 145 curDrop = &lDrop; 146 } else { 133 147 iV=(linear_to_dB(maxR)+30) / 30; 148 curPeak = &rPeak; 149 curPeakColor = &rPeakColor; 150 curDrop = &rDrop; 151 } 134 152 135 153 if (iV<0) iV=0; … … 138 156 rc.bottom -= 2; 139 157 158 159 if (*curPeak < iV) 160 { 161 (*curPeak) = iV; 162 (*curPeakColor) = (iV < VU_PERCENT_12DB) ? VU_COLOR_LOW : (iV < VU_PERCENT_6DB) ? VU_COLOR_12DB : VU_COLOR_6DB; 163 (*curDrop) = 0; //VU_PEAK_DROPRATE; 164 } 165 166 f = (direction == SB_VERT) ? rc.bottom : rc.right; 167 ivPos = (LONG)(iV * f); 168 pos12db = (LONG)(VU_PERCENT_12DB * f); 169 pos6db = (LONG)(VU_PERCENT_6DB * f); 170 peakPos = (LONG)((*curPeak) * f); 171 172 // Draw the VU meter 173 140 174 if (direction == SB_VERT) { 141 double f = rc.bottom; 142 RECT rcAmp = { 0, rc.bottom - (LONG)(iV*f), rc.right, rc.bottom }; 175 RECT rcAmp = { 0, rc.bottom - ((iV > VU_PERCENT_12DB) ? pos12db : ivPos), rc.right, rc.bottom }; 143 176 OffsetRect(&rcAmp, 1, 1); 144 dc.FillSolidRect(&rcAmp, 0x00ff00); 145 146 RECT rcBlank = { 0, 0, rc.right, rc.bottom - (LONG)(iV*f) + 1}; 177 dc.FillSolidRect(&rcAmp, VU_COLOR_LOW); 178 if (iV > VU_PERCENT_12DB) { 179 RECT rc12db = { 0, rc.bottom - pos12db, rc.right, rc.bottom - ((iV > VU_PERCENT_6DB) ? pos6db : ivPos) }; 180 OffsetRect(&rc12db, 1, 1); 181 dc.FillSolidRect(&rc12db, VU_COLOR_12DB); 182 if (iV > VU_PERCENT_6DB) { 183 RECT rc6db = { 0, rc.bottom - pos6db, rc.right, rc.bottom - ivPos}; 184 OffsetRect(&rc6db, 1, 1); 185 dc.FillSolidRect(&rc6db, VU_COLOR_6DB); 186 } 187 } 188 } else { 189 RECT rcAmp = {0, 0, (iV > VU_PERCENT_12DB) ? pos12db : ivPos, rc.bottom }; 190 OffsetRect(&rcAmp, 1, 1); 191 dc.FillSolidRect(&rcAmp, VU_COLOR_LOW); 192 if (iV > VU_PERCENT_12DB) { 193 RECT rc12db = {pos12db, 0, (iV > VU_PERCENT_6DB) ? pos6db : ivPos, rc.bottom }; 194 OffsetRect(&rc12db, 1, 1); 195 dc.FillSolidRect(&rc12db, VU_COLOR_12DB); 196 if (iV > VU_PERCENT_6DB) { 197 RECT rc6db = {pos6db, 0, ivPos, rc.bottom }; 198 OffsetRect(&rc6db, 1, 1); 199 dc.FillSolidRect(&rc6db, VU_COLOR_6DB); 200 } 201 } 202 } 203 204 // Draw blank part and peak line 205 206 if (direction == SB_VERT) { 207 RECT rcBlank = { 0, 0, rc.right, rc.bottom - ivPos + 1}; 147 208 OffsetRect(&rcBlank, 1, 1); 148 dc.FillSolidRect(&rcBlank, 0x000000); 149 } else { 150 double f = rc.right; 151 RECT rcAmp = {0, 0, (LONG)(iV*f), rc.bottom }; 152 OffsetRect(&rcAmp, 1, 1); 153 dc.FillSolidRect(&rcAmp, 0x00ff00); 154 // DrawAmpRect(dc, &rcAmp, iV, SB_HORZ); 155 156 RECT rcBlank={(LONG)(iV*f)+1, 0, rc.right, rc.bottom}; 209 dc.FillSolidRect(&rcBlank, VU_COLOR_BLANK); 210 211 if(*curPeak) { 212 RECT rcPeak={0, rc.bottom - peakPos, rc.right, rc.bottom - peakPos + 2}; 213 OffsetRect(&rcPeak, 1, 1); 214 dc.FillSolidRect(&rcPeak, (*curPeakColor)); 215 (*curPeak) -= (*curDrop); 216 (*curDrop) += VU_PEAK_DROPRATE; 217 } 218 } else { 219 RECT rcBlank={ivPos + 1, 0, rc.right, rc.bottom}; 157 220 OffsetRect(&rcBlank, 1, 1); 158 dc.FillSolidRect(&rcBlank, 0x000000); 159 } 160 221 dc.FillSolidRect(&rcBlank, VU_COLOR_BLANK); 222 223 if(*curPeak) { 224 RECT rcPeak={peakPos, 0, peakPos + 2, rc.bottom}; 225 OffsetRect(&rcPeak, 1, 1); 226 dc.FillSolidRect(&rcPeak, (*curPeakColor)); 227 (*curPeak) -= (*curDrop); 228 (*curDrop) += VU_PEAK_DROPRATE; 229 } 230 } 161 231 return 0; 162 232 } -
trunk/src/buzelib/VisualVolumeSlider.h
r1273 r1292 7 7 // could be made to work both horizontal and vertical, and then 8 8 // create a builtin master mixer-board to set vol and pan 9 10 #define VU_COLOR_LOW 0x00ff00 /* Green */ 11 #define VU_COLOR_12DB 0x99CCFF /* Yellow */ 12 #define VU_COLOR_6DB 0x0000FF /* Red */ 13 #define VU_COLOR_BLANK 0x000000 /* Black */ 14 15 #define VU_PERCENT_12DB 0.91 /* Approximately -12 dB judging from jedShivaMeter */ 16 #define VU_PERCENT_6DB 0.955 /* Approximately -6 dB judging from jedShivaMeter */ 17 18 #define VU_PEAK_DROPRATE 0.005 9 19 10 20 const int VISUAL_BUFFER_SIZE = 1024; … … 29 39 30 40 float maxR, maxL; 41 float rPeak, lPeak; 42 float rDrop, lDrop; 43 COLORREF lPeakColor; 44 COLORREF rPeakColor; 31 45 int direction; // SB_VERT or SB_HORZ 32 46 -
trunk/src/buzelib/buze.rc
r1289 r1292 987 987 IDR_PARAMETERVIEW ACCELERATORS 988 988 BEGIN 989 VK_F1, ID_HELP, VIRTKEY, NOINVERT 989 990 VK_TAB, ID_PARAMETERVIEW_NEXTSLIDER, VIRTKEY, NOINVERT 990 991 VK_TAB, ID_PARAMETERVIEW_PREVIOUSSLIDER, VIRTKEY, SHIFT, NOINVERT -
trunk/src/buzelib/res/about.txt
r1247 r1292 3 3 * Main coding by Anders Ervik 4 4 * Psycle and LADSPA wrappers by Polac 5 * Additional code by halfo and zeffii5 * Additional code by halfo, zeffii and zoner 6 6 * Toolbar icons by Hiren Shah 7 7 * The default index.txt created by Wayfinder -
trunk/src/buzelib/res/help.txt
r1232 r1292 25 25 Delete Delete selection 26 26 27 Shift+Enter Show machine parameters 27 28 Ctrl+Backspace Show properties 28 29 -
trunk/src/buzelib/res/keyboard_parameters.txt
r1279 r1292 2 2 Parameter View keyboard shortcuts 3 3 4 (keyboard notes) Play notes in selected machine 5 Tab Next parameter 6 Shift+Tab Previous parameter 4 7 Right/Left +/- 1 5 8 Shift+Right/Shift+Left +/- 4 6 9 Ctrl+Right/Ctrl+Left +/- 32 7 10 0..9 Type a value 8 alt+pPreset Dropdown11 Alt+P Preset Dropdown 9 12 -
trunk/src/buzelib/res/keyboard_patterneditor.txt
r1279 r1292 26 26 Shift+F5 Play current pattern 27 27 Shift+F6 Play current pattern from cursor 28 Shift+ EnterPlay row under cursor28 Shift+8 Play row under cursor 29 29 Ctrl+Enter New pattern 30 30 Ctrl+Shift+Enter Clone pattern … … 68 68 Space Paste current parameter value 69 69 Ctrl+Space Paste current group values 70 Ctrl+T Toggle column editor for number columns 70 71 (keyboard notes) Edit notes -
trunk/src/buzelib/res/keyboard_wavetable.txt
r1288 r1292 2 2 Wave table keyboard shortcuts 3 3 4 F9 Show file browser 4 (keyboard notes) Play notes with selected wave 5 F9 Show file browser 5 6 Shift+A Zoom out, show all 6 7 Shift+S Zoom to selection
