Click here to Skip to main content
15,904,155 members
Home / Discussions / C#
   

C#

 
QuestionI wan to make USB Bolcker using vb.net or C# Pin
Deb00724-Sep-14 20:36
Deb00724-Sep-14 20:36 
QuestionRe: I wan to make USB Bolcker using vb.net or C# Pin
George Jonsson25-Sep-14 0:04
professionalGeorge Jonsson25-Sep-14 0:04 
AnswerRe: I wan to make USB Bolcker using vb.net or C# Pin
Deb0078-Oct-14 2:35
Deb0078-Oct-14 2:35 
AnswerRe: I wan to make USB Bolcker using vb.net or C# Pin
George Jonsson8-Oct-14 20:56
professionalGeorge Jonsson8-Oct-14 20:56 
GeneralRe: I wan to make USB Bolcker using vb.net or C# Pin
Deb0078-Oct-14 21:26
Deb0078-Oct-14 21:26 
QuestionRe: I wan to make USB Bolcker using vb.net or C# Pin
George Jonsson9-Oct-14 16:28
professionalGeorge Jonsson9-Oct-14 16:28 
AnswerRe: I wan to make USB Bolcker using vb.net or C# Pin
Deb0079-Oct-14 19:30
Deb0079-Oct-14 19:30 
GeneralRe: I wan to make USB Bolcker using vb.net or C# Pin
George Jonsson9-Oct-14 21:20
professionalGeorge Jonsson9-Oct-14 21:20 
AnswerRe: I wan to make USB Bolcker using vb.net or C# Pin
Sibeesh KV26-Sep-14 0:19
professionalSibeesh KV26-Sep-14 0:19 
Questionretrieving contents from word file using c# windows application Pin
Reshma Chandran24-Sep-14 18:31
Reshma Chandran24-Sep-14 18:31 
AnswerRe: retrieving contents from word file using c# windows application Pin
Sibeesh KV24-Sep-14 18:36
professionalSibeesh KV24-Sep-14 18:36 
QuestionPrintTicket in GetPrintJobInfoCollection? Pin
murali_utr24-Sep-14 18:28
murali_utr24-Sep-14 18:28 
QuestionRefactor 'switch/case' That Is Based Enum Value Pin
Matt U.24-Sep-14 9:48
Matt U.24-Sep-14 9:48 
AnswerRe: Refactor 'switch/case' That Is Based Enum Value Pin
Pete O'Hanlon24-Sep-14 10:07
mvePete O'Hanlon24-Sep-14 10:07 
AnswerRe: Refactor 'switch/case' That Is Based Enum Value Pin
PIEBALDconsult24-Sep-14 10:54
mvePIEBALDconsult24-Sep-14 10:54 
Questionintegrate any bill acceptor in my c# application Pin
MaurizioFiorentino24-Sep-14 7:19
MaurizioFiorentino24-Sep-14 7:19 
AnswerRe: integrate any bill acceptor in my c# application Pin
ZurdoDev24-Sep-14 10:05
professionalZurdoDev24-Sep-14 10:05 
GeneralRe: integrate any bill acceptor in my c# application Pin
MaurizioFiorentino30-Sep-14 6:47
MaurizioFiorentino30-Sep-14 6:47 
AnswerRe: integrate any bill acceptor in my c# application Pin
ZurdoDev30-Sep-14 7:15
professionalZurdoDev30-Sep-14 7:15 
QuestionCoding music rhythms Pin
Navid Abyazi24-Sep-14 5:27
professionalNavid Abyazi24-Sep-14 5:27 
QuestionRe: Coding music rhythms Pin
ZurdoDev24-Sep-14 5:53
professionalZurdoDev24-Sep-14 5:53 
AnswerRe: Coding music rhythms Pin
Navid Abyazi25-Sep-14 7:00
professionalNavid Abyazi25-Sep-14 7:00 
QuestionRe: Coding music rhythms Pin
ZurdoDev25-Sep-14 7:17
professionalZurdoDev25-Sep-14 7:17 
GeneralRe: Coding music rhythms Pin
PIEBALDconsult24-Sep-14 6:09
mvePIEBALDconsult24-Sep-14 6:09 
Sounds like homework. And I think your implementation so far is going to cause trouble -- particularly due to the use of floating-point values (integers will suffice). And I definitely wouldn't use recursion. Dead | X|

I'd also like to pass along a hint. Rather than starting from 1/1 and splitting, consider starting from 1/16 - 1/16 ... and work up to 16/16 (or 32/32, whatever).


I have finished an implementation that uses an enumeration to define the values and returns an IEnumerable of Lists of the values; it's pretty slick and not much code. What do you have so far?


Edit: Due to poor performance when considering 1/32 and 1/64, I may look into a stack-based approach rather than the brute-force iterative approach.

Comparisons between the iterative and stack implementations:

// 1/4
    6 rhythms found in 00:00:00.0000072
    6 rhythms found in 00:00:00.0000057
// 1/4, with dots
    8 rhythms found in 00:00:00.0000121
    8 rhythms found in 00:00:00.0000064
// 1/8
   56 rhythms found in 00:00:00.0015299
   56 rhythms found in 00:00:00.0008122
// 1/8, with dots
  114 rhythms found in 00:00:00.0015542
  114 rhythms found in 00:00:00.0008210
// 1/16
 5272 rhythms found in 00:00:00.0055043
 5272 rhythms found in 00:00:00.0024528
// 1/16, with dots
24098 rhythms found in 00:00:00.0125192
24098 rhythms found in 00:00:00.0074718


So it looks like the stack-based algorithm generally takes about half the time as the iterative version.

I still haven't performed a full run on 1/32 or 1/64.

modified 30-Sep-14 13:36pm.

GeneralRe: Coding music rhythms Pin
BillWoodruff24-Sep-14 22:06
professionalBillWoodruff24-Sep-14 22:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.