Skip to content

Commit

Permalink
Insert next empty unused sequence & duplicate sequence (Chordian#60)
Browse files Browse the repository at this point in the history
* Added a buffer for duplicating sequence Chordian#20

* Revert "Added a buffer for duplicating sequence Chordian#20"

This reverts commit 62229c8.

* Removed trailing whitespace only Chordian#20

* Duplicated some code to use for new feature Chordian#20

* Added clang-format config that resembles current style

* Implemented insert first empty unused sequence Chordian#47

* Updated documentation Chordian#47

* Formatting Chordian#47

* Split sequence splits to the first empty unused sequence Chordian#47

* Duplicate sequence implemented Chordian#20

* Changed flight recorder shortcut to Shift d Chordian#20
To avoid conflict with duplicate sequence

* Revert "Changed flight recorder shortcut to Shift d Chordian#20"

This reverts commit 4a74379.

* Added const keywords where possible (in new code) Chordian#20

* Deduplication by passing sequence finder function to generic function Chordian#20

* Mapped flight recorder to shift-ctrl-d Chordian#20

* Fixed new keybindings in config.ini Chordian#20

* Documentation and small fix Chordian#20
- Removed debug keys from documentation and config.ini
- Added new keys to notes.txt
- Do not allow duplicate sequence when editing the orderlist number

* Fixed duplicated sequence popping up in the wrong places. Chordian#20

* Processed review comments
Consistent naming, const argument

* Fix for not duplicating empty sequence properly. Chordian#20

* Added Duplicate sequence and replace command

* Move cursor to duplicate when appending Chordian#20

* Updated README Chordian#20
  • Loading branch information
micheldebree authored Oct 20, 2020
1 parent eaa6c7e commit 519d89e
Show file tree
Hide file tree
Showing 15 changed files with 360 additions and 90 deletions.
139 changes: 139 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
---
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: true
# BeforeLambdaBody: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 2
UseCRLF: false
UseTab: Always
...

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ SIDFactoryII/*.vcxproj.user
*.o
artifacts
xcuserdata
.ccls-cache
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ binaries](https://github.com/Chordian/sidfactory2/workflows/Build%20macOS%20bina

## Changelog

- Added: **Ctrl-Shift-f** insert first _empty_ unused sequence
- Added: **Ctrl-d** duplicate and replace sequence
- Added: **Ctrl-Shift-d** duplicate and append sequence
- Split sequence now splits to the first _empty_ unused sequence
- `linux` Now includes SF2Converter in the build
- `macOS` Fixed [#71](https://github.com/Chordian/sidfactory2/issues/71) switch instrument/command while in a table (Thanks to Adam Davidovics
for reporting)
Expand Down
12 changes: 6 additions & 6 deletions SIDFactoryII/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Editor.Driver.Default = "sf2driver11_02.prg"
Editor.Skip.Intro = 0
Editor.Driver.ConvertLegacyColors = 1

// Overlay
// Overlay
Show.Overlay = 0

Overlay.Width = 1920
Overlay.Width = 1920
Overlay.Height = 976
Overlay.Editor.Position.X = 320
Overlay.Editor.Position.Y = 234
Expand Down Expand Up @@ -64,8 +64,6 @@ Key.ScreenEdit.ImportSong = @f10:control
Key.ScreenEdit.SaveSong = @f11
Key.ScreenEdit.SaveInstrument = @f11:shift
Key.ScreenEdit.ToggleOverlay = @f12
Key.ScreenEdit.ToggleFlightRecorderOverlay = @d:control
Key.ScreenEdit.ToggleDebugView = @d:shift:alt
Key.ScreenEdit.ToggleMuteChannel1 = @1:control
Key.ScreenEdit.ToggleMuteChannel2 = @2:control
Key.ScreenEdit.ToggleMuteChannel3 = @3:control
Expand All @@ -86,7 +84,7 @@ Key.ScreenEdit.IncrementCommandIndex = @numplus:control, @down:alt:control:s
Key.ScreenEdit.DecrementCommandIndex = @numminus:control, @up:alt:control:shift
Key.ScreenEdit.SetOrderlistLoopPointAll = @l:control
Key.ScreenEdit.FastForward = @half
Key.ScreenEdit.FasterForward = @half:shift
Key.ScreenEdit.FasterForward = @half:shift
Key.Track.CursorUp = @up
Key.Track.CursorDown = @down
Key.Track.ToggleGateUntilNextEvent = @down:shift:control
Expand Down Expand Up @@ -121,12 +119,14 @@ Key.Track.CancelOrderlistInput = @escape
Key.Track.ToggleTieNote = @return:shift
Key.Track.Copy = @c:control
Key.Track.Paste = @v:control
Key.Track.DuplicateAndReplaceSequence = @d:control
Key.Track.DuplicateAndAppendSequence = @d:control:shift
Key.Track.InsertFirstFreeSequence = @f:control
Key.Track.InsertFirstEmptySequence = @f:control:shift
Key.Track.SplitSequenceAtEventPosition = @b:control
Key.Track.SetSelectedInstrumentIndexValue = @i:control
Key.Track.SetSelectedCommandIndexValue = @o:control
Key.Track.SetOrderlistLoopPoint = @l:shift:control
Key.Track.Debug = @d:alt

[windows] // Applies to the windows platform only

Expand Down
25 changes: 13 additions & 12 deletions SIDFactoryII/config/config.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[default] // Applies to all platforms
[default]

// Sound options
Sound.Emulation.Resample = 1 // If set to 1, the SID emulation will use resampling, otherwise only linear interpolation
Expand All @@ -9,10 +9,10 @@ Editor.Driver.Default = "sf2driver11_02.prg"
Editor.Skip.Intro = 0
Editor.Driver.ConvertLegacyColors = 1

// Overlay
// Overlay
Show.Overlay = 0

Overlay.Width = 1920
Overlay.Width = 1920
Overlay.Height = 976
Overlay.Editor.Position.X = 320
Overlay.Editor.Position.Y = 234
Expand All @@ -23,8 +23,8 @@ Overlay.Driver.Image.Y = 0
Overlay.Fade.Duration = 100

// Color schemes
ColorScheme.Selection = 5
ColorScheme.Count = 6
ColorScheme.Selection = 0
ColorScheme.Count = 8

ColorScheme.Name.0 = "Default"
ColorScheme.Filename.0 = "default.ini"
Expand All @@ -38,6 +38,10 @@ ColorScheme.Name.4 = "Ocean"
ColorScheme.Filename.4 = "ocean.ini"
ColorScheme.Name.5 = "Earth"
ColorScheme.Filename.5 = "earth.ini"
ColorScheme.Name.6 = "Navy"
ColorScheme.Filename.6 = "navy.ini"
ColorScheme.Name.7 = "Classic"
ColorScheme.Filename.7 = "classic.ini"

// Key configuration
Key.ScreenEdit.Stop = @escape
Expand All @@ -60,8 +64,6 @@ Key.ScreenEdit.ImportSong = @f10:control
Key.ScreenEdit.SaveSong = @f11
Key.ScreenEdit.SaveInstrument = @f11:shift
Key.ScreenEdit.ToggleOverlay = @f12
Key.ScreenEdit.ToggleFlightRecorderOverlay = @d:control
Key.ScreenEdit.ToggleDebugView = @d:shift:alt
Key.ScreenEdit.ToggleMuteChannel1 = @1:control
Key.ScreenEdit.ToggleMuteChannel2 = @2:control
Key.ScreenEdit.ToggleMuteChannel3 = @3:control
Expand All @@ -81,8 +83,8 @@ Key.ScreenEdit.DecrementInstrumentIndex = @numminus, @up:alt:control
Key.ScreenEdit.IncrementCommandIndex = @numplus:control, @down:alt:control:shift
Key.ScreenEdit.DecrementCommandIndex = @numminus:control, @up:alt:control:shift
Key.ScreenEdit.SetOrderlistLoopPointAll = @l:control
Key.ScreenEdit.FastForward = @½
Key.ScreenEdit.FasterForward = @½:shift
Key.ScreenEdit.FastForward = @half
Key.ScreenEdit.FasterForward = @half:shift
Key.Track.CursorUp = @up
Key.Track.CursorDown = @down
Key.Track.ToggleGateUntilNextEvent = @down:shift:control
Expand Down Expand Up @@ -117,21 +119,20 @@ Key.Track.CancelOrderlistInput = @escape
Key.Track.ToggleTieNote = @return:shift
Key.Track.Copy = @c:control
Key.Track.Paste = @v:control
Key.Track.DuplicateSequence = @d:control
Key.Track.InsertFirstFreeSequence = @f:control
Key.Track.InsertFirstEmptySequence = @f:control:shift
Key.Track.SplitSequenceAtEventPosition = @b:control
Key.Track.SetSelectedInstrumentIndexValue = @i:control
Key.Track.SetSelectedCommandIndexValue = @o:control
Key.Track.SetOrderlistLoopPoint = @l:shift:control
Key.Track.Debug = @d:alt

[windows] // Applies to the windows platform only

#include "user.ini"

[macos] // Applies to the macos platform only

#include "~/.config/sidfactory2/user.ini"

// Key overrides for the mac version
Key.ScreenEdit.IncrementInstrumentIndex = @down:cmd
Key.ScreenEdit.DecrementInstrumentIndex = @up:cmd
Expand Down
Loading

0 comments on commit 519d89e

Please sign in to comment.